cancel
Showing results for 
Search instead for 
Did you mean: 

HANA Script Data difference

Former Member
0 Kudos

Is there any DATADiff fuction in HANA?

SQL: DATEDIFF("ORDR"."DocDate", "ODLN"."DocDate") AS "Days"

HANA:???????

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Ashish,

You could do it the following way.

SELECT DAYS_BETWEEN (TO_DATE ('2009-12-05', 'YYYY-MM-DD'), TO_DATE('2010-01-05', 'YYYY-MM-DD')) "days between" FROM DUMMY;

days between

31


Reference information on SAP HANA is available at SAP HANA Platform – SAP Help Portal Page

Then use the links for SAP HANA SQL Reference to either download the pdf or view online.

There you will find different functions available.

Pawan

acaireta
Participant
0 Kudos

That's good to know the days between, but and others between functions? (month, year, week ...)?

For Example:  DATEDIFF(m,""U_GSP_DateIn"",""U_GSP_DateOut"") ?¿?

Thanks.