Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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

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

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

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

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

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

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
Honored Contributor III

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

Hi

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

Sasi

Community Browser