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
 Number of days difference

Author  Topic 

MikeWG
Starting Member

1 Post

Posted - 2011-04-22 : 15:01:45
I am trying to find out the number of days from a datetime field where the start date is 2010-12-17 and now? Any idea how to write that?

Thanks!!!

jimf
Master Smack Fu Yak Hacker

2875 Posts

Posted - 2011-04-22 : 15:05:52
select datediff(day,'20101217',getdate())

Jim

Everyday I learn something that somebody else already knew
Go to Top of Page
   

- Advertisement -