About 71,700 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 - 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. …

  3. sql server - DateDiff () Hours and Minutes? - Stack Overflow

    Mar 7, 2016 · Closed 9 years ago. This question have been asked many times but i cannot find any easy answers on how to get hours and minutes from a datediff().

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

  5. SQL DateDifference in a where clause - Stack Overflow

    DateDiff is extremely fast... Your problem is you are running it on the database table column value, so the query processor must run the function on every row in the table, even if there …

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

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

  8. Calculate exact date difference in years using SQL

    All datediff() does is compute the number of period boundaries crossed between two dates. For instance datediff(yy,'31 Dec 2013','1 Jan 2014') returns 1. You'll get a more accurate result if …

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

  10. How to cast the interval of DateDiff function of the SQL in to …

    Aug 21, 2013 · As pointed out in the comments DATEDIFF returns an INT value of the difference of both dates. Since DATETIME is based on 1900-01-01 being the "base date" meaning …