About 56 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. 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?

  3. sql - 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: …

  4. date - DATEDIFF de SQL Server - Stack Overflow en español

    Sep 21, 2020 · Me encuentro trabajando con SQL Server 2014 y Oracle 19c, necesito obtener la diferencia en microsegundos, segundos, minutos y horas entre dos fechas que tienen un rango de …

  5. sql - Using GETDATE WITH DATEDIFF? - Stack Overflow

    Mar 24, 2017 · It counts the number of year boundaries between two dates. So, the difference between Jan 1 20015 and Dec 31 2016 is 1 year. In addition, with DATEDIFF() the column is an argument to …

  6. sql server 2008 - DATEADD (MONTH, DATEDIFF (MONTH, 0, GETDATE …

    Jul 26, 2012 · The DateDiff function returns how many seconds, months, years - whatever interval you specify between the first date (here 0) and the second date (here the current date).

  7. Calcular el número de días entre dos fechas (SQL Server)

    Aug 26, 2019 · Como comentario a tu edición: DATEDIFF te dará la diferencia entre dos fechas, sin importar si son dos fechas en la misma semana, o en el mismo año o en el mismo siglo.

  8. sql - How to use DATEDIFF to return year, month and day ... - Stack ...

    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 …

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

    I've got 2 date columns in my table (start_date, end_date). I've tried Datediff(day, start_date, end_date), but I was prompt with: invalid column name How can I calculate the date difference bet...

  10. sql - How to get the average of a DATEDIFF ()? - Stack Overflow

    Jul 20, 2015 · SELECT DATEDIFF(day, DateUsed, DateExpires) AS DaysBetweenExpirationAndUse FROM tblOffer How could i get the average number of days from the …