Qlik Date Conversion for SAP

  • How-Tos FAQs
  • October 28, 2020
Get Started Transforming Your Data in Snowflake - feature img

Qlik Date Conversion for SAP

Qlik Date Conversion for SAP

When interpreting a date from an SAP datasource, the format being read will likely be different from what one would expect. To explain how Qlik date conversion for SAP works, check out the below scenario.

In the example of an SAP date, displayed in SAP in the format 01.10.2021, the value an SAP dataset will return is 79788998.

How do we convert this value to date?

The solution lies within SAP logic, and how dates are stored and calculated in the SAP data structure.

https://answers.sap.com/questions/5902579/date-conversion.html

Within SAP, the process is to subtract the value received from 99999999

w_date = 99999999 - w_date . " Getting original date

Simply follow the same process in Qlik:

vDate = (99999999 - SAPDateValue);

The value returned will be in the format YYYYMMDD.

To convert to SAP format, use date#():

vDate = date#(99999999 - SAPValue,'DD.MM.YYYY');

Convert to alternative formats using date#()

vDate = date#(99999999 - SAPValue,'DD/MM/YYYY');
vDate = date#(99999999 - SAPValue,YYYY-MM-DD');

And that’s how you can start converting your date for SAP.


Up Next: Learn How to Start Loving the Qlik Synthetic Key

Related Posts

Top 5 Snowflake tools for Analysts- talend

Top 5 Snowflake Tools for Analysts

  • Ndz Anthony
  • February 26, 2024