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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date formatting

Hi All,

I am having trouble with the formatting of date.

The source is currently in this format

yyyy/mm/dd - session number, e.g, 2010/06/30 - 406

I am trying to create a master calendar with this date field.

I removed the session number from the field using subfield, and I am left with the date.

I want the date to be DD/MM/YY, so i use the Date function;

Date(SUBFIELD(SessionDate,'-',1),'DD/MM/YYYY') AS NewDate but while the session number is successfully removed, the format remains unchanged.

Anyone can help?

1 Solution

Accepted Solutions
nagaiank
Specialist III
Specialist III

Try the following:

Date(Date#(Trim(SubField(SessionDate,'-')),'YYYY/MM/DD'),'DD/MM/YYYY') as NewDate

View solution in original post

2 Replies
nagaiank
Specialist III
Specialist III

Try the following:

Date(Date#(Trim(SubField(SessionDate,'-')),'YYYY/MM/DD'),'DD/MM/YYYY') as NewDate

Not applicable
Author

I tried that as soon as I finished writing this post and yes, it works, many thanks