Question about time conversions


  • 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


  • 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,

    Monday, August 19, 2013 4:09 AM