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

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

  3. MySql using DATEDIFF inside IF clause - Stack Overflow

    Apr 1, 2006 · MySql using DATEDIFF inside IF clause Asked 12 years, 9 months ago Modified 12 years, 9 months ago Viewed 12k times

  4. sql - How do you handle NULLs in a DATEDIFF comparison?

    May 10, 2012 · Why use datediff instead of just comparing the two dates? Doesn't that just require extra processing time?

  5. get DATEDIFF excluding weekends using sql server

    I am using this query to get time taken. SELECT DATEDIFF(dd, ActualStartDate, ActualCompletionDate) AS TimeTaken FROM TableName Now I want to exclude weekends …

  6. sql - Date Difference between consecutive rows - Stack Overflow

    The question is tagged with MS Access, and as far as I know Access does not support analytical functions. The question also states the OP is using Access 2003 which definitely does not …

  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. Using CASE Function with DATEDIFF and COUNT - Stack Overflow

    Jul 30, 2014 · Instead, your query is actually using the second syntax. The count(*)<=0 expression is evaluated to a boolean which is then implicitly converted to an integer, the type …

  9. Get last 30 day records from today date in SQL Server

    Dec 15, 2014 · 1 You can use this to get the data of the last 30 days, based on a column. WHERE DATEDIFF(dateColumn, CURRENT_TIMESTAMP) BETWEEN 0 AND 30

  10. SQL DateDifference in a where clause - Stack Overflow

    I m doing a query as follows: SELECT * FROM a WHERE DATEDIFF(D, a.DateValue, DateTimeNow) &lt; 3; and not working I m trying to get the data that s not older than 3 days. …