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

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

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

  4. sql server 2008 - DATEADD (MONTH, DATEDIFF (MONTH, 0, …

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

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

  6. sql server - datediff rounding - Stack Overflow

    I have a db table in SQL Server which contains a start date for a project. On a web status page I want to show how many days/weeks/months the project has run, the units depending on the …

  7. Calculate difference between 2 date / times in Oracle SQL

    You can substract dates in Oracle. This will give you the difference in days. Multiply by 24 to get hours, and so on. SQL> select oldest - creation from my_table; If your date is stored as …

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

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

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