Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
yura_ratu
Partner - Creator II
Partner - Creator II

Getting Date from text

Hi everyone,

How can I get date from text in format 'MMM D, YYYY'?

For instance:

Apr 1, 2014

Apr 12, 2014

Thanks in advance

1 Solution

Accepted Solutions
maxgro
MVP
MVP

=date(date#('Apr 1, 2014', 'MMM DD, YYYY'))

you can use a text box with previous expression to check it and try different format

in the script

load

     .....

     date(date#(yoursourcedatefield, 'MMM DD, YYYY')) as DateField,

     ,,,,,,,,,,,,,

detailed explanation here

QlikView Date fields

View solution in original post

7 Replies
maxgro
MVP
MVP

=date(date#('Apr 1, 2014', 'MMM DD, YYYY'))

you can use a text box with previous expression to check it and try different format

in the script

load

     .....

     date(date#(yoursourcedatefield, 'MMM DD, YYYY')) as DateField,

     ,,,,,,,,,,,,,

detailed explanation here

QlikView Date fields

jsingh71
Partner - Specialist
Partner - Specialist

Try this:

 

Date(Today(),'MMM dd,yyyy')

--Jai

MK_QSL
MVP
MVP

How is your actual date format?

considering you have datefield in 'DD/MM/YYYY'

you can convert 'DD/MM/YYYY' to 'MMM D, YYYY' as below

Write below in your script...

Date(Date#(DateField, 'DD/MM/YYYY'),'MMM D, YYYY') as DateField

yura_ratu
Partner - Creator II
Partner - Creator II
Author

Thank you, but I don’t think my question was clear.

I receive files with dates in 'MMM D, YYYY' format, but QlikView doesn't treat it as date, I'd like to format it in regular date

MK_QSL
MVP
MVP

Date(Date#(DateField, 'MMM D, YYYY')) as DateField

jsingh71
Partner - Specialist
Partner - Specialist

Ok, then try this:

Date(<Your Date Field>,'MM/DD/YY') as Date

yura_ratu
Partner - Creator II
Partner - Creator II
Author

There is a space before date in files. So, your formula works with this correction. I didn't mention this space

Date(Date#(DateField, ' MMM D, YYYY')) as DateField

Thank you