About 54 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 should be 14.063 …

  2. 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 month 10 day Can …

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

  4. Diferença entre duas datas em dias, horas, minutos e segundos

    Jun 7, 2015 · Problema: Como realizar a subtração entre duas datas e retornar o valor em Dias, Horas, Minutos e Segundos em uma consulta SQL com SQL Server 2014? Exemplo: Dados: …

  5. Calculate exact date difference in years using SQL

    I receive reports in which the data is ETL to the DB automatically. I extract and transform some of that data to load it somewhere else. One thing I need to do is a DATEDIFF but the year needs to...

  6. Why does datediff return 1 day less than the actual difference?

    Sep 22, 2014 · Datediff returns the number of borders passed between one value and another; in the case of days, think of the function as counting midnights.

  7. SQL DateDifference in a where clause - Stack Overflow

    the query processor must run the function on every row in the table helped me understand and solve an issue I was having where the exact same DATEDIFF statement would complain about an overflow in …

  8. Include Start Date and the End Date in DateDiff function

    DATEDIFF(DAY, '8/4/2014', '8/5/2014') +1 You need to add 1 to the DATEDIFF function and it will work as you want. Also to note that: DATEDIFF Returns the count (signed integer) of the specified …

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

    Feb 8, 2019 · DATEDIFF(YEAR, r.BirthDate, ISNULL(@Date,GETDATE())) returns a value of 100. Is there a way to round the value down?

  10. sql - DATEDIFF function in Oracle - Stack Overflow

    Feb 9, 2015 · I need to use Oracle but DATEDIFF function doesn't work in Oracle DB. How to write the following code in Oracle? I saw some examples using INTERVAL or TRUNC. SELECT DATEDIFF …