About 33,200,000 results
Open links in new tab
  1. Extracting hours from a DateTime (SQL Server 2005)

    May 28, 2017 · sql t-sql datetime sql-server-2005 hour edited May 28 at 19:16 Peter Mortensen 31.4k 22 110 134

  2. sql - Get Hours and Minutes (HH:MM) from date - Stack Overflow

    Jan 17, 2013 · 1 Following code shows current hour and minutes in 'Hour:Minutes' column for us.

  3. sql - Extracting hour value from datetime column using DATEPART ...

    I'm trying to extract the numerical hour value from a column that contains time formatted as DateTime. For example, here are a couple of records from that column: Time Aired 4:20:00 …

  4. sql - Getting the hour from a datetime? - Stack Overflow

    Jun 23, 2010 · 3 How can I select the hour from a datetime? I'm looking for the equivalent of Oracle's TO_CHAR( d, 'HH24' ), which would return 17 for 2010-06-23 17:22:31. I tried to find …

  5. sql - How can I group time by hour or by 10 minutes? - Stack …

    Details and extra commentary Bin interval size The MINUTE and 10 terms can be changed to any DATEPART and integer,2 respectively, to group into different time intervals. For example, 10 …

  6. t sql - How to calculate difference in hours (decimal) between two ...

    I have to calculate the difference in hours (decimal type) between two dates in SQL Server 2008. I couldn't find any useful technique to convert datetime to decimal with 'CONVERT' on MSDN.

  7. sql - Truncate date to only hour / minute - Stack Overflow

    Mar 20, 2012 · How do i trunc the date in sql server 2008 like this : I have 2012-01-02 12:04:11.443 and I want only to select 2012-01-02 12:00:00.000 and 2012-01-02 12:04:00.000 …

  8. sql server - sql cast hour out of datetime without dropping leading ...

    Feb 16, 2012 · sql cast hour out of datetime without dropping leading zero on single digit hours Asked 13 years, 9 months ago Modified 7 years, 3 months ago Viewed 55k times

  9. sql - How do i get the full hour instead of the minutes ... - Stack ...

    Oct 27, 2021 · DATEADD(HOUR,DATEDIFF(HOUR,0,YourColumn),0); This gets the number of hours between the "date" 0 (1900-01-01) and your date value, and then adds that many hours …

  10. How to add hours to current date in SQL Server?

    I am trying to add hours to current time like -- NOT A VALID STATEMENT -- SELECT GetDate(DATEADD (Day, 5, GETDATE())) How can I get hours ahead time in SQL Server?