About 47,500 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 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, …

  3. How do I calculate interval between two datetime2 columns (SQL …

    Nov 13, 2014 · The datediff function resulted in an overflow. The number of dateparts separating two date/time instances is too large. Try to use datediff with a less precise datepart. One way …

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

  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 - Date Difference between consecutive rows - Stack Overflow

    1001 10/9/2011 - 12/9/2011 2 days 1001 12/9/2011 - 20/9/2011 8 days 1001 20/9/2011 NA Basically what i would like to do is have an access query that calculates the date difference for …

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

  9. sql - SAP HANA Find the days between two dates that are in …

    SELECT id, DATEDIFF(DAY, MIN(Date), MAX(Date)) AS days_between FROM your_table_name GROUP BY id; This query will give you the difference in days between the minimum and …

  10. sql - DateDiff to output hours and minutes - Stack Overflow

    Jan 21, 2014 · my code gives TOTAL HOURS in hours, but i am trying to output something like TotalHours 8:36 where 8 represents hour part and 36 represents minutes part mean …