January 7, 2010 at 9:29 am
Comments posted to this topic are about the item Clearing Change Log Entries
January 19, 2010 at 1:42 pm
Alternatively, replace all the date calc code with:
select @qdt=dateadd(m,-1,dateadd(d,datediff(d,'1 Jan 1900',getdate()),'1 Jan 1900')-datepart(d,getdate())+1)
This returns the first day of the previous month, 12:00 am, as does the given script.
An explanation of what the code was doing would have been nice, rather than having to work it out. However, the majority is not needed as SQL provides all the necessary functions for doing date calcs...
June 10, 2010 at 4:12 am
Incomplete script.
May 19, 2016 at 1:26 pm
Thanks for the script.
May 19, 2016 at 1:26 pm
I'll give it to my admin and let him decide if it is complete or not.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply