none
Question about time conversions

    Question

  • please provide me the best way to convert a time (1 hour 30 min 48 sec) in hours without decimal.....

    I m waiting....

    Monday, August 19, 2013 4:02 AM

Answers

  • You can use DATEPART to return the hour component of a time value:

    SELECT DATEPART(hour, CAST('01:30:48' AS time));


    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

    Monday, August 19, 2013 4:09 AM