Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I am a qlikview learner , i have a requirement in which my data consists of different date formats eg('DD-MM-YYYY/DD-MMM-YYYY etc )
Now i am trying to convert all the above date formats in to one format Like 'MM-DD-YYYY') .Any Ideas please
Thanks In advance
If you have more than one DateField, you need to use Alt, Date# and Date functions to convert to single format... Check below example where DateField is Converted to your requested Format..
I have kept DateField and NewDateField both for your comparison purpose.. You can obviously remove DateField and Rename the Formula as DateField...
Load
DateField,
Date(ALT(Date#(DateField,'DD-MM-YYYY'),Date#(DateField,'DD-MMM-YYYY')),'MM-DD-YYYY') as NewDateField
Inline
[
DateField
01-01-2014
20-09-2014
10-MAR-2014
15-SEP-2014
];
Hi,
use Date# function.
E.g.
if your format is DD-MM-YYY
Date(Date#(fielddate,'DD-MM-YYY'),'MM-DD-YYY')
Regards
If you have more than one DateField, you need to use Alt, Date# and Date functions to convert to single format... Check below example where DateField is Converted to your requested Format..
I have kept DateField and NewDateField both for your comparison purpose.. You can obviously remove DateField and Rename the Formula as DateField...
Load
DateField,
Date(ALT(Date#(DateField,'DD-MM-YYYY'),Date#(DateField,'DD-MMM-YYYY')),'MM-DD-YYYY') as NewDateField
Inline
[
DateField
01-01-2014
20-09-2014
10-MAR-2014
15-SEP-2014
];
Thanks Manish Kachhia !!!
Its Working for me