Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to convert a period field into yyyy/mm

hi all

i have below  field  is like that i need change as yyyy/mm kindly plz help me to find correct solution for the problem

period.JPG

1 Solution

Accepted Solutions
hytown2000
Partner - Contributor III
Partner - Contributor III

You may use expression like this,

Date(Date#(Period, 'YYYYMM'), 'YYYY/MM')

View solution in original post

6 Replies
hytown2000
Partner - Contributor III
Partner - Contributor III

You may use expression like this,

Date(Date#(Period, 'YYYYMM'), 'YYYY/MM')

MK9885
Master II
Master II

If that's an XL file then

Select your dates>Right click>Format Cells>Custom>Select any value and Type YYYY/MM>Ok

1.png

Again select all dates>click on the ! icon on the left>Convert to XX to 20XX

2.png

Not applicable
Author

thank u Tommy

Not applicable
Author

Hi Kowsik,

You can use MakeDate(Year,Month,01) as Period

~ Ravi Kancharla

Not applicable
Author

Thank you Ravi

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi All,

Keep in mind that this will be still kept as a separate date for each day of month so to convert it to month-year value you will have to use something like:


Date(MonthStart(Date#(Period, 'YYYYMM'), 'YYYY/MM')))

then when you use this column in listbox you will fin one instead of 28,29 or 30-31 the same looking values in each month.

regards

Lech

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.