hi, i have to get the last day of the current month. how can i get
+3
A:
set dateformat dmy
select dateadd(d, -1, dateadd(m, 1, '01-' + convert(varchar, month(getdate())) + '-' + convert(varchar, year(getdate()))))
add one month to the first of this month, minus one day.
thank you it is working fine
Surya sasidhar
2010-03-22 04:56:10
A:
Oracle
SELECT LAST_DAY(SYSDATE) AS Last_day_of_month FROM DUAL;
SQL Server (Copied from gabe's link)
SELECT dateadd(day, -day(getdate()), dateadd(month, 1, getdate())) AS Last_day_of_month
beach
2010-03-22 04:23:19
A:
SQLite (sqlite3)
Compute the last day of the current month.
SELECT date('now','start of month','+1 month','-1 day');
checkout this link as well if your using sqlite3 sqlite datetime functions
galford13x
2010-03-22 04:33:20