Not able to get the difference between two dates (SAP)

SAP HANASAPSAP Basis

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.

raja
Published on 07-Dec-2017 20:10:19
Advertisements