I am seeking to find first date of the month in the corresponding table:
So if i have 26/08/2011 August as date and 2 months to add, it becomes 26/10/2011. I need the first date of the resulting month- like 01/10/2011.
Can this be achieved in SQL?
Update : I could get the date of the month using DATEADD(month,months_add, date)
Couldnt get to "beginning of month". Tried: How can I select the first day of a month in SQL? But for me it throws the error: function pg_catalog.date_diff("unknown", integer, date) does not exist;