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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
danielnevitt
Creator
Creator

Date Format

Hi,

I have a field that is named period_cd and is text in the format MMM-YY (JAN-18).  Is there a way that I can easily convert this to format YYYYMM (201801)?

Thanks,

Daniel

14 Replies
YoussefBelloum
Champion
Champion

Yes I deleted it because I thought I could do better.. like sureshqv‌'s expression.

Good to know it is working for you

YoussefBelloum
Champion
Champion

if Mat_year and Mat_month are related to the date Period_cd, I suggest you yo delete them from your table and to create a derived mmm-yy field from your Period_cd field on the master calendar.

danielnevitt
Creator
Creator
Author

They are coming from a different data source.  I have four different data sources and one of the common joins is period_cd in format MMM-YY.

Thanks,

Daniel

YoussefBelloum
Champion
Champion

if your data sources are concatenated in one table, do like described above, otherwise you should use canonical date.

Canonical Date

But now we are far from the initial problem

rubenmarin

It case it helps:

=Date(Date#('APR-18','MMM-YY') , 'YYYYMM') => 201804; MM=Month

=Date(Date#('APR-18','MMM-YY') , 'YYYYmm') => 201800; mm=Minute