About 853,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. 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 …

  4. sql server - How to get difference of days/months/years (datediff ...

    I am looking for a way to implement the SQLServer-function datediff in PostgreSQL. That is, this function returns the count (as a signed integer value) of the specified datepart boundaries …

  5. 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, 2 months ago Viewed 31k times

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

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

    select *, DATEDIFF (yy, Begin_date, GETDATE()) AS 'Age in Years' from Report_Stage; The 'Age_In_Years' column is being rounded. How do I get the exact date in years?

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

    Mar 7, 2016 · The datepart passed to DATEDIFF will control the resolution of the output. example, if start_date and end_date differed by 59 seconds, then DATEDIFF (MINUTE, start_date, …

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

    SELECT DATEDIFF(MONTH, '2009-04-16', '2009-05-15') but instead of giving me full months between the two date, it gives me the difference of the month part, i.e. anyone know how to …

  10. sql server - SQL DateDifference in a where clause - Stack Overflow

    SELECT * FROM a WHERE DATEDIFF(D, a.DateValue, DateTimeNow) < 3; and not working I m trying to get the data that s not older than 3 days. SQL server. How to do this? DATEDIFF …