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
 Time question - SQL Server 2000

Author  Topic 

rpc86
Posting Yak Master

200 Posts

Posted - 2008-08-07 : 02:44:09
[CODE]
Select DateDiff(n,'08:29','13:48')/60
[/CODE]

I expect 5.32 but it shows only 5 hours.

I already used round() but the same result.

How will I solve this?

Thank you

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-08-07 : 02:45:43
Select DateDiff(n,'08:29','13:48')*1.0/60
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-08-07 : 02:46:41
reason is this

http://sqlblogcasts.com/blogs/madhivanan/archive/2008/01/16/beware-of-implicit-conversions.aspx
Go to Top of Page

rpc86
Posting Yak Master

200 Posts

Posted - 2008-08-07 : 02:50:19
Thank you. It works.
Go to Top of Page
   

- Advertisement -