Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
how to change 1.11.2019 to 1/11/2019 i.e. date format
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
];
=Date(Date#('1.11.2019','D.MM.YYYY'),'D/MM/YYYY')
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.
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...
thanks a lot, I got the solution but I didn't get the output for "1.13/2018"
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
];