"Killer" <ro*********@tiscali.it> wrote in message news:Sf*******************@twister2.libero.it...
How can i calculate the last day of the previous month?
Help me,please
The last date of previous month:
SELECT CURRENT_TIMESTAMP - DAY(CURRENT_TIMESTAMP)
If you need the date normalized (time of 12:00AM), then:
SELECT CAST(CONVERT(CHAR(8),
CURRENT_TIMESTAMP - DAY(CURRENT_TIMESTAMP),
112) AS DATETIME)
--
JAG