Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

difference in date of the sap format date

Hi Guys,

Please help me......

i need to get a difference of two dates from SAP Data. columns are posting date and document date.

the condition should be if posting date - document date is <= 5 it is not violated if more than 5 its violated.

the date format is like this DD.MM.YYYY

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

You can try something like this:

=if(interval((Date(PostingDate)-Date(DocumentDate)),'DD')<=5,'Not Violated','Violated')

Hope this helps.

Regards,

-Khaled.

View solution in original post

4 Replies
vikasgupta
Creator
Creator

Hi

Try to use this format

if((OrdDate-OmDelDt) <= 0, (OrdDate-OmDelDt),(OrdDate-OmDelDt)) as Ontime

Thanks

Vikas Gupta

vikasgupta
Creator
Creator

Hi

If you wants to change the date format use this expression :

Date(OmExpDelDt,'DD/MM/YYYY') AS OmExpDelDt

and the syntax format of if is following :

if(condition , then , else)

Thanks

Vikas gupta

Not applicable
Author

Hi,

You can try something like this:

=if(interval((Date(PostingDate)-Date(DocumentDate)),'DD')<=5,'Not Violated','Violated')

Hope this helps.

Regards,

-Khaled.

nagaiank
Specialist III
Specialist III

You may try

=if(Date#(PostingDate,'DD.MM.YYYY')-Date#(DocumentDate,'DD.MM.YYYY')<=5,'Not Violated','Violated')