Quantcast
Viewing all articles
Browse latest Browse all 14773

SQL for Current Year Starting and ending dates - response (1) by muthm

The most readable solution for me would probably be this:
select
    cast( trim( extract( year from current_date ) ) || '-01-01' as DATE )
        as first_day_of_year,
    cast( trim( extract( year from current_date ) ) || '-12-31' as DATE )
        as last_day_of_year;


Viewing all articles
Browse latest Browse all 14773

Trending Articles