DATEDIFF is a common function in the SQL Server to find the number of days between two dates. Oracle offers its own solution, although does not have the DATEDIFF function.
What's the function in Oracle that would be the equivalent to DATEDIFF in the SQL Server?
On Oracle, it is an arithmetic issue:
- Select DATE1-DATE2 from dual
- Use trunc() for the number of days.
Otherwise, multiply the value:
- by 24 for hours
- by 1440 for minutes
- by 86400 for seconds
Do you need more help with SQL server? Check out our forum!
- Datediff oracle
- Oracle datediff
- Oracle sql datediff
- Oracle forgot password > Guide
- How to reset a sequence in Oracle? > Guide
- Enable drag and drop in VirtualBox: Mac, Ubuntu > Guide
- Connecting to Oracle via php
- Oracle 9i database
- How to avoid duplicate records in SQL: select query
- How to list Oracle tables