Reputation: 33
I want to get first date of the month.
condition is : (current month - 36) so i have written like DATEADD(month, -36, getdate()) but it is giving the date like 2018-06-22 00:00:00 but I need the output like 2018-06-01 00:00:00
Br, Satish.
Upvotes: 1
Views: 632
Reputation: 10232
Try date_trunc:
date_trunc('month', DATEADD(month, -36, getdate()))
Upvotes: 2