Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
robert99
Specialist III
Specialist III

convert eg 21. January 2015 to a date

The date is in this format

DD. MMMM YYYY

I converted using  (@5  is the date field)

subfield (@5 ,'.' , 1)   & '/'   &   NUM (MONTH (DATE#( PURGECHAR( @5, '. 1234567890'), 'MMM'))) & '/' & 2016 as DateInv

NB Its only 2016 dates for now

Why doesn't something like this work

Date# (@5 , 'DD. MMMM YYYY')

I tried everything I could think of but no joy

Including converting @5 to 21January2016 (using trim and purgechar etc) before using date#

Thanks for any help.

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Use below in script

Date(Date#(YourDateField,'DD. MMMM YYYY'), 'DDMMMMYYYY') as YourDateField

or

below in front end

Date(Date#(YourDateField,'DD. MMMM YYYY'), 'DDMMMMYYYY')

View solution in original post

3 Replies
MK_QSL
MVP
MVP

Use below in script

Date(Date#(YourDateField,'DD. MMMM YYYY'), 'DDMMMMYYYY') as YourDateField

or

below in front end

Date(Date#(YourDateField,'DD. MMMM YYYY'), 'DDMMMMYYYY')

MK_QSL
MVP
MVP

or use this

Date(Date#(subfield (@5 ,'.' , 1) & '/' & PURGECHAR( @5, '. 1234567890') & '/' & SubField(@5,' ',-1),'DD/MMMM/YYYY'),'DD/MMM/YYYY') as DateInv

robert99
Specialist III
Specialist III
Author

Thanks Manish

Very simple. Strange I'm sure I tried this but it didn't work.