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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Convert a string to a Date

Hi Community,

Maybe someone could help me...

I have a string field called 'Departure' populate like that = [January 11th 2018  12:00:00]

I would like to convert it into a Date field/dimension => [01/11/2018]

Maybe someone nice could help me...

my brain is going to expose

Thanks a lot,

Thomas

ps: currently I get only the number of the month with the formula below:

=wildmatch((LEFT(Departure,FindOneOf(Departure,' '))), 'ja*','fe*','ma*','April','May','Jun','July','August','September','October','November','December')

Labels (1)
1 Reply
maxgro
MVP
MVP

you can use the LongMonthNames

Set LongMonthNames =

          'January;February;March;April;May;June;July;August;September;October;November;December';

         

load

     field,

     date(

     date#(

          subfield(field, ' ', 1) & ' ' &

          left(subfield(field, ' ', 2),2) & ' ' &

          subfield(field, ' ', 3)

          ,

          'MMMM DD YYYY')

          ,'DD/MM/YYYY') as newfield

inline [

field

January 11th 2018  12:00:00

January 01st 2018  12:00:00

February 02nd 2017  03:00:00

];

1.png

Roman Emperors and the Month Names