About 221,000 results
Open links in new tab
  1. SQL time difference between two dates result in hh:mm:ss

    Oct 1, 2012 · For example, here's how you would do that in SQL Server 2012 or later: --get the difference between two datetimes in the format: 'hh:mm:ss' CREATE FUNCTION …

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

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

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

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

  5. Get last 30 day records from today date in SQL Server

    Dec 15, 2014 · Get last 30 day records from today date in SQL Server Asked 10 years, 10 months ago Modified 4 years, 2 months ago Viewed 333k times

  6. sql server - Calculating number of full months between two dates …

    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 …

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

  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 …

  9. sql - How to calculate age (in years) based on Date of Birth and ...

    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 …

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

    All datediff() does is compute the number of period boundaries crossed between two dates. For instance datediff(yy,'31 Dec 2013','1 Jan 2014') returns 1. You'll get a more accurate result if …