About 54 results
Open links in new tab
  1. 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 …

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

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

  4. 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) / …

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

  7. Calculate the difference in dates with SQL - Stack Overflow

    Sep 14, 2020 · Can you post the whole query? That syntax looks correct and in line with the documentation for DATEDIFF. It is possible that there is something wrong in another part of the …

  8. How do you handle NULLs in a DATEDIFF comparison?

    Why use datediff instead of just comparing the two dates? Doesn't that just require extra processing time?

  9. sql - Show datediff as seconds, milliseconds - Stack Overflow

    Dec 15, 2016 · I'm trying to calculate the difference between two datetime values. I tried datediff(s, begin,end) and datediff(ms, begin,end) however I want the difference to be returned as …

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