[dba-SQLServer]Why Year 2001?

Nicholson, Karen knicholson at gpsx.net
Wed Sep 24 11:36:34 CDT 2003


What part of this is telling it to extract the year 2001 instead of 2003?

select DATEADD(mm,
DATEDIFF(mm,0,dateadd(mm,-1-datepart(day,getdate()),getdate())),0)


More information about the dba-SQLServer mailing list