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

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

  4. SQL DateDifference in a where clause - Stack Overflow

    SELECT * FROM a WHERE DATEDIFF(D, a.DateValue, DateTimeNow) < 3; and not working I m trying to get the data that s not older than 3 days. SQL server. How to do this? DATEDIFF works too slow..

  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. Include Start Date and the End Date in DateDiff function

    Start Date End Date Tot#Days 08-04-2014 08-04-2014 1 08-04-2014 08-05-2014 2 08-04-2014 08-07-2014 4 I tried using the DATEDIFF function however I get a 0 for the first example, 1 for second …

  7. sql server 2008 - DateDiff years into decimals - Stack Overflow

    May 2, 2012 · DATEDIFF(dd, @EndDateTime, i.mat_exp_dte)/365 Am confused now as to how to calculate this. Would i need to convert the DataDiff into a different data type?

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

  9. How to get the average of a DATEDIFF ()? - Stack Overflow

    Jul 20, 2015 · SELECT DATEDIFF(day, DateUsed, DateExpires) AS DaysBetweenExpirationAndUse FROM tblOffer How could i get the average number of days from the …

  10. t sql - How to calculate difference in hours (decimal) between two ...

    I have to calculate the difference in hours (decimal type) between two dates in SQL Server 2008. I couldn't find any useful technique to convert datetime to decimal with 'CONVERT' on MSDN. Can any...