To get last month's last and first date
SELECT (date_trunc('month', now()-interval '6 month')::date - 1) as last_month_date
SELECT (date_trunc('month', now()-interval '6 month')::date ) as first_month_date
The above query can be used to get last month's last date from current month
No comments:
Post a Comment