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

    Jan 22, 2010 · 20 I can mention four important functions of MS SQL Server that can be very useful: 1) The function DATEDIFF () is responsible to calculate differences between two dates, …

  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. Time difference with hours, minutes and seconds in SQL Server

    Jan 2, 2017 · Time difference with hours, minutes and seconds in SQL Server Asked 8 years, 11 months ago Modified 2 years, 1 month ago Viewed 31k times

  4. sql server - DATEDIFF Rounding - Database Administrators Stack …

    Aug 27, 2024 · No rounding occurs in this case because the zero maps to an exact date value and the strings are all exactly representable. 3. MishMash = DATEDIFF(DAY, …

  5. get DATEDIFF excluding weekends using sql server

    Using DATEDIFF(WK, ...) will give us the number of weeks between the 2 dates. SQL Server evaluates this as a difference between week numbers rather than based on the number of days.

  6. sql - Datediff function between a date column and current date?

    How can I correctly calculate the difference in days or years between a date column and the current date? typically would use where date_diff('day, date_column1, date_column2) as …

  7. sql - Datediff between 2 columns in same table - Stack Overflow

    Datediff between 2 columns in same table Asked 12 years, 2 months ago Modified 3 years, 4 months ago Viewed 48k times

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

    15 Have you tried getting the difference in months instead and then calculating the years that way? For example 30 months / 12 would be 2.5 years. Edit: This SQL query contains several …

  9. sql server - datediff rounding - Stack Overflow

    I have a db table in SQL Server which contains a start date for a project. On a web status page I want to show how many days/weeks/months the project has run, the units depending on the …

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