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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Change date format

Dear all,

How can I change below dateformat into a usable one:

Sep 30 2013 12:58AM

I already have the time covered, but I cannot seem to get the date converted.

1 Solution

Accepted Solutions
Jason_Michaelides
Partner - Master II
Partner - Master II

Try,


Date(TimeStamp#(DateField,'MMM DD YYYY hh:mmtt'),'DD/MM/YYYY')


Hope this helps,


Jason

View solution in original post

12 Replies
israrkhan
Specialist II
Specialist II

try

=Date(Floor(DateField), 'DD/MM/YYYY') AS DATE

janardhan
Creator
Creator

Hi ,

Go to properties , in Number Tab select which expression u want to convert date format and select Date in Number format settings , from there u will convert date format as u like.

I Hope this will helps.

Jason_Michaelides
Partner - Master II
Partner - Master II

You may need to force QV to recognise your field as a date-time first:

Date(Date#(Left(DateField,11),'MMM DD YYYY'),'DD/MM/YYYY')

This will only work if you know DateField is always MMM DD YYYY hh:mm

Hope this helps,

Jason

Not applicable
Author

Yes, Now I get the date in a useable format. But there is always a next question... to really calculate with this I need the timestamp as well. And if I use this field in the timestamp formula I get strange dates. Any thoughts?


Jason_Michaelides
Partner - Master II
Partner - Master II

Try,


Date(TimeStamp#(DateField,'MMM DD YYYY hh:mmtt'),'DD/MM/YYYY')


Hope this helps,


Jason

Not applicable
Author

Dear Jason,

This works if the format is Oct 30 2013 10:09PM, but it goes false if any of the data is in another format, like:

Nov 1 2013 10:09PM or

Oct 30 2013 9:09PM

Any ideas how to tackle this?

Jason_Michaelides
Partner - Master II
Partner - Master II

Date(TimeStamp#(DateField,'MMM D YYYY h:mmtt'),'DD/MM/YYYY')

Not applicable
Author

No, that does not work...

Jason_Michaelides
Partner - Master II
Partner - Master II

What does it return?