Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
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 II
Partner - Master II

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 II
Partner - Master II

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

];