Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everyone,
I am pretty to new here and a qlikview enthusiastic learner. I have been trying a scenario but getting bugs regarding dates.
Scenario : I have taken a raw data file , contains fieldnames:
name, country, gender, Birth_date (ie. in format 'DD/MM/YYYY')
qlikview default format set to - 'DD-MM-YY' .
Now my task is while loading the data from the sheet, i want to load the birth_date to the default format
for which i am using code
Date#( Birth_date,'DD-MM-YY) as DOB
and also tried
Date(Date#(BirthDate,'DD/MM/YYYY'),'DD-MM-YYYY') as DOB
both are not giving any required resultants
Can anyone help me out , how to convert this date format for entire column at once.
Thanks In Advance.
To load them in QlikView's default format, try one of the two below:
Date(Birth_date) as DOB or
Date(Date#(Birth_date, 'DD/MM/YYYY')) as DOB
Above script should change DOB into DD-MM-YY format. Is this what you wanted?
Best,
Sunny
Thanks For the Suggestion Sunny.
Actually i have completed task by using the below statement
Date(Date#(BirthDate,'DD/MM/YYYY'),'DD-MM-YY') as DOB
but when i tried the first one, it doesn't worked for my data (i.e., Date(Birth_date) as DOB)
Regards
MSSK
That is because QlikView might have not understood the format of your date and would have taken it as a text. In which case it would give you nulls when you apply Date() function to it. So by using Date#() you told QlikView that the date is in 'DD/MM/YYYY' format and then you changed it to DD-MM-YY format.
I am glad you did have it figured on your own.
Best,
Sunny
Hi
Please post sample data demonstrating the problem so that we can help you
Sasi