Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
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

Tags (1)
1 Solution

Accepted Solutions
hytown2000
New Contributor III

Re: how to convert a period field into yyyy/mm

You may use expression like this,

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

6 Replies
hytown2000
New Contributor III

Re: how to convert a period field into yyyy/mm

You may use expression like this,

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

Khan_Mohammed
Honored Contributor II

Re: how to convert a period field into yyyy/mm

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

Re: how to convert a period field into yyyy/mm

thank u Tommy

Not applicable

Re: how to convert a period field into yyyy/mm

Hi Kowsik,

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

~ Ravi Kancharla

Not applicable

Re: how to convert a period field into yyyy/mm

Thank you Ravi

Lech_Miszkiewicz
Honored Contributor III

Re: how to convert a period field into yyyy/mm

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". This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution.
Please LIKE threads if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem.