Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Action-Packed Learning Awaits! QlikWorld 2023. April 17 - 20 in Las Vegas: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
gaurav2017
Creator II
Creator II

Different date format in one field

Hi

I want to know that how to deal with this type of data attached below in the CSV format. If we have different type of date format in the data source, then how to make it look in a single format?

I know below code is not right, but help me people to correct this one.

This is my code:

Load Date,

          Data,

          date#(date, 'DD-MMM-YYYY'),

          date#(num(date, 'DD-MMM-YYYY'))

from .\data\Test01.csv;

Regards,

3 Replies
jsn
Employee
Employee

Hi Gaurav,

What format does the Date field in your CSV file have at the moment? Or actually what formats, since you mention multiple formats. Can you give an example of each?

Also, how would you like the values to be formatted in QlikView?

gaurav2017
Creator II
Creator II
Author

There are mixed values

like

Numerical format:  01/01/2012

Text format:           01-Jan-2012, 01-01-2012, 01/Jan/2012

in the field "date"

& I want it all of them in a single common format, either it would be in text or inumerical.

Regards,

hic
Employee
Employee

Alt( Timestamp#(MixDate,'M/D/YYYY h:mm tt'),

Date#(MixDate,'M/D/YYYY'),

Date#(MixDate,'D/M/YYYY'),

Date#(MixDate,'YYYYMMDD'),

Date#(MixDate,'DD.MM.YYYY'),

Date#(MixDate,'YYYY-MM-DD')

) as MixDate

HIC

http://community.qlik.com/docs/DOC-3102