Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 DATEDIFF

Author  Topic 

avmreddy17
Posting Yak Master

180 Posts

Posted - 2008-01-27 : 19:32:51
SELECT DATEDIFF(mm,0,'01/25/2008')
Returns 1296 what does it represent...

Thanks

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2008-01-27 : 19:47:45
the number of months between 1900-01-01 and 2008-01-25.

mm is Months
0 is 1900-01-01 ... ie: select convert(datetime, 0)

Be One with the Optimizer
TG
Go to Top of Page

avmreddy17
Posting Yak Master

180 Posts

Posted - 2008-01-27 : 19:58:16
Thanks TG
Go to Top of Page
   

- Advertisement -