About 43,200 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. 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) / …

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

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

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

  6. How to calculate DATE Difference in PostgreSQL? - Stack Overflow

    Here I need to calculate the difference of the two dates in the PostgreSQL. Like we do in SQL Server its much easier. DATEDIFF(Day, MIN(joindate), MAX(joindate)) AS DateDifference; I am trying usi...

  7. datediff - Calculate difference between two dates in the same MS …

    Nov 28, 2022 · 0 I'm working on a database where the production team can input their worked hours and such into a form. I want to have them fill in when they started and completed a task and calculate the …

  8. How to cast the interval of DateDiff function of the SQL in to Datetime ...

    Aug 21, 2013 · i have a query that uses DateDiff function of the SQL.The interval returns min, hour or days according to how i put it. I want to return a Datetime datatype instead of the resulting integer …

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

  10. DATEADD(MONTH, DATEDIFF(MONTH, 0, GETDATE()), 0) Can someone …

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