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
 Convert Time to Decimal

Author  Topic 

stharish
Starting Member

43 Posts

Posted - 2012-03-26 : 19:54:07
Using T-SQL...

How can I convert a time to decimal?

Example: Convert 07:53:00 to 7.88

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2012-03-26 : 20:18:33
[code]select datediff(second, 0, '07:53:00') / (60.0 * 60.0)[/code]


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -