About 315,000 results
Open links in new tab
  1. Difference of two date time in sql server - Stack Overflow

    Jan 22, 2010 · Is there any way to take the difference between two datetime in sql server? For example, my dates are 2010-01-22 15:29:55.090 2010-01-22 15:30:09.153 So, the result …

  2. SQL time difference between two dates result in hh:mm:ss

    DateDifference 1 73:12:30 It's also easier to read the result if you add padding so the format is always hh:mm:ss. For example, here's how you would do that in SQL Server 2012 or later:

  3. 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.

  4. Calculating number of full months between two dates in SQL

    DATEDIFF () is designed to return the number boundaries crossed between the two dates for the span specified. To get it to do what you want, you need to make an additional adjustment to …

  5. sql - DATEDIFF in HH:MM:SS format - Stack Overflow

    Starting in SQL SERVER 2012, you don't need to use DATEDIFF function. You can use FORMAT function to achieve what you want:

  6. sql server - Calculate exact date difference in years using SQL

    sql sql-server datediff edited Apr 18, 2014 at 16:47 user330315 asked Apr 17, 2014 at 23:59

  7. How to calculate age (in years) based on Date of Birth and getDate()

    Oct 15, 2009 · I have a table listing people along with their date of birth (currently a nvarchar(25)) How can I convert that to a date, and then calculate their age in years? My data looks as …

  8. sql server - DateDiff () Hours and Minutes? - Stack Overflow

    Mar 7, 2016 · This question have been asked many times but i cannot find any easy answers on how to get hours and minutes from a datediff(). From To OUTPUT 08:00 16:30 8,5 10:00 …

  9. How to use DATEDIFF to return year, month and day?

    Oct 9, 2009 · How can I use DATEDIFF to return the difference between two dates in years, months and days in SQL Server 2005 DATEDIFF (date , date) How to result that: 2 year 3 …

  10. Time difference with hours, minutes and seconds in SQL Server

    Jan 2, 2017 · I need to find time difference between two columns with hours, minutes and seconds. These are two datetime columns in my table: STOP_TIME Start_Time