About 87,900 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 - How to calculate age (in years) based on Date of Birth and ...

    Oct 15, 2009 · I have a table listing people along with their date of birth (currently a nvarchar(25)) How can I convert that to a date, and then calculate their age in years? My data looks as …

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

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

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

  6. Calculating number of full months between two dates in SQL

    DATEDIFF () is designed to return the number boundaries crossed between the two dates for the span specified. To get it to do what you want, you need to make an additional adjustment to …

  7. get DATEDIFF excluding weekends using sql server

    Using DATEDIFF(WK, ...) will give us the number of weeks between the 2 dates. SQL Server evaluates this as a difference between week numbers rather than based on the number of days.

  8. How do I calculate interval between two datetime2 columns (SQL …

    Nov 13, 2014 · Hi I'm trying to calculate the difference between two columns of datetime2 type. However SQL server (2012) doesn't seem to like the following: select cast ('2001-01-05 …

  9. sql - How to find the number of days between two dates - Stack …

    Googling "How to find the number of days between two dates query" found multitudes of answers. That's what you should try first.

  10. Difference between 2 dates in SQLite - Stack Overflow

    How do I get the difference in days between 2 dates in SQLite? I have already tried something like this: SELECT Date('now') - DateCreated FROM Payment It returns 0 every time.