Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
AbdulHaseebKhan
Contributor II
Contributor II

date format

how to change  1.11.2019 to 1/11/2019 i.e. date format

Labels (1)
1 Solution

Accepted Solutions
BrunPierre
Partner - Master
Partner - Master

You've now provided three distinct date formats. That said @MarcoWedel's suggestion still applies as follows:

LOAD Date(Alt(Date#(Date,'D.MM.YYYY'),Date#(Date,'M/DD/YYYY'),Date#(Date,'M.DD/YYYY'),),'D/MM/YYYY') as TransformedDate

Inline[
Date
1.1.2019
2/22/2019
1.13/2018

];

View solution in original post

5 Replies
MarcoWedel

 

=Date(Date#('1.11.2019','D.MM.YYYY'),'D/MM/YYYY')

MarcoWedel_1-1664550518983.png

 

 

 

AbdulHaseebKhan
Contributor II
Contributor II
Author

thanks a lot.

the input also contains other normal date format inputs like 2/22/2019, if I use the above date function then I'm getting only the output for the 1.1.2019 and not getting the output for others.

MarcoWedel

You can use the Alt() function to interpret both formats:

Date(Alt(Date#(YourDatesHavingDifferentFormats,'D.MM.YYYY'),
                  Date#(YourDatesHavingDifferentFormats,'M/DD/YYYY')),'D/MM/YYYY')


https://help.qlik.com/en-US/sense/May2022/Subsystems/Hub/Content/Sense_Hub/Scripting/ConditionalFunc...


 

AbdulHaseebKhan
Contributor II
Contributor II
Author

thanks a lot, I got the solution but I didn't get the output for "1.13/2018"

BrunPierre
Partner - Master
Partner - Master

You've now provided three distinct date formats. That said @MarcoWedel's suggestion still applies as follows:

LOAD Date(Alt(Date#(Date,'D.MM.YYYY'),Date#(Date,'M/DD/YYYY'),Date#(Date,'M.DD/YYYY'),),'D/MM/YYYY') as TransformedDate

Inline[
Date
1.1.2019
2/22/2019
1.13/2018

];