Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date format

Hi,

I have a date field as 25012007 (january 25 , 2007) so in the text format 'DDMMYYYY'

What is the best way to transform this field in a date format 'YYYY/MM/DD' in the script.

Regards

JJ

5 Replies
Anonymous
Not applicable
Author

=

date(date#(DateField, 'DDMMYYYY'), 'YYYY/MM/DD')





hector
Specialist
Specialist

Hi, you can use

date(date#(DATE_FIELD,'DDMMYYYY'),'YYYY/MM/DD') as field_YYYYMMDD

this is going to transform the original in a field with the format YYYYMMDD, but internally it's going to be a date, so you can use year(), month() etc..

rgds.

hector
Specialist
Specialist

LOL

2 minutes of difference xD

Not applicable
Author

Tx Michael for your help

Not applicable
Author

Tx Hector for your help - LOL