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

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
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

Labels (1)
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