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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 datediff returns int

Author  Topic 

Nowy
Yak Posting Veteran

57 Posts

Posted - 2007-06-01 : 10:10:57
When I execute the following query int returned

select datediff(s, '20-May-2007 16:35:27', '22-May-2007 17:36:27')
from Test

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2007-06-01 : 10:30:50
Yup. that is correct.

- Jeff
http://weblogs.sqlteam.com/JeffS
Go to Top of Page

blindman
Master Smack Fu Yak Hacker

2365 Posts

Posted - 2007-06-01 : 10:36:23
Yes, it returns the number of seconds as a integer. That is what the function is supposed to do.

e4 d5 xd5 Nf6
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-06-01 : 10:53:08
it does?
i always thought it returnes number of fractaled nano seconds...

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

blindman
Master Smack Fu Yak Hacker

2365 Posts

Posted - 2007-06-01 : 12:02:47
Actually, it returns the number of minutes multiplied by 60. Very curious logical implementation choice by Microsoft...

e4 d5 xd5 Nf6
Go to Top of Page
   

- Advertisement -