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.

Updated on: 13-Feb-2020

479 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements