About 185,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, the result could …

  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, CONVERT(datetime, 0), …

  5. sql server - How do we get an hour, minute and second difference ...

    Mar 9, 2017 · The second parameter of DATEDIFF takes a datetime so your string is implicitly converted to a datetime. In lack of something better to use for a date SQL Server uses 1900-01-01 so your …

  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 difference So...

  7. SQL Server DATEDIFF round up the YEAR difference. How to round it …

    Feb 8, 2019 · SQL Server DATEDIFF round up the YEAR difference. How to round it down? Asked 6 years, 10 months ago Modified 10 months ago Viewed 13k times

  8. 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 duration. So

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

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

  10. sql - Count work days between two dates - Stack Overflow

    Oct 31, 2008 · How can I calculate the number of work days between two dates in SQL Server? Monday to Friday and it must be T-SQL.