Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to change the entire column one date format to other date format while loading the script?

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.

4 Replies
sunny_talwar

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

Not applicable
Author

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

sunny_talwar

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

sasiparupudi1
Master III
Master III

Hi

Please post sample data demonstrating the problem so that we can help you

Sasi