Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Converting YYYY-MM-DD to DD-MM-YYYY in IF( function

Hey all,

In some of the qlikview logfiles that im loading into qlikview are ISO time notations like this: 20160916T052550.159+0200

And the other time notations are just normal YYYY-MM-DD notations.


In an IF function I converted the ISO times to normal times and they changed to a DD-MM-YYYY notation.


If(Wildmatch(Timestamp, '*T*'), Timestamp(Timestamp#(Timestamp)), Timestamp) as TS


So now i have two different time notations. (YYYY-MM-DD and DD-MM-YYYY)

I tried converting the YYYY-MM-DD notation by using the Date(Date#(Timestamp, 'YYYY-MM-DD'), 'DD-MM-YYYY') function inside the IF function used above.

This didnt work unfortunately.


Is there any way to solve this problem?

1 Solution

Accepted Solutions
varshavig12
Specialist
Specialist

alt function can be used for multiple date formats.

View solution in original post

2 Replies
Anil_Babu_Samineni

How about this? Might not sure i understand fully

Date(Left(ISOTimeNotation, 8),'YYYY-MM-DD')

Or

Date(Date#(Left(ISOTimeNotation, 8),'YYYY-MM-DD'),'DD-MM-YYYY')

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
varshavig12
Specialist
Specialist

alt function can be used for multiple date formats.