SQL for the current month begin date and end date

General
Enthusiast

SQL for the current month begin date and end date

Hello all,

I am new to the terdadata database and looking for some help regarding sql for the current month begin date and current month end date

2 REPLIES
Senior Supporter

Re: SQL for the current month begin date and end date

Select (current_date - extract(day from current_date))+1 ,

add_months(current_date,1) - extract(day from add_months(current_date,1)) 

Ulrich

Enthusiast

Re: SQL for the current month begin date and end date

FYR...

select date

,cast(date/100*100+1 as date)

,add_months(cast(date/100*100+1 as date),1)-1;