- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Not able to get the difference between two dates (SAP)
It’s a very basic operation that you do in database. You can try using DateAdd function available and use the date overload of the function. You need to pass one date as negative so in actual the difference is calculated
SELECT DATEADD(d,-[dateTwo], [dateOne]) AS 'Difference in Dates' FROM [TABLE]
Here‘d’ refers to the day.
Advertisements
To Continue Learning Please Login
Login with Google