Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

paulyeo11
Valued Contributor II

Why chart 1 date format display as 401218 ?

Hi All

I have chart 1 and chart 2 , why chart 1 unable to display the correct date format ?

Paul

1 Solution

Accepted Solutions

Re: Why chart 1 date format display as 401218 ?

Hi,

Its because the dates are converted into julian date.

Use Date() function to show it in date format.

Pick(Match($(Var_P),1,2,3,4,5,6,7,8,9,10),(if(year>2011,year)),YearQtr,YearMonth,YearMonthWeek,Date(YearMonthDay),REGION_,COUNTRY,GROUP_CLASS,company)


Regards,

kaushik Solanki

7 Replies
mhartono
Contributor

Re: Why chart 1 date format display as 401218 ?

Hi Paul,

What about adding a date format to your existing PERIOD formula? Will it work?

Date(Pick(Match($(Var_P),1,2,3,4,5,6,7,8,9,10),(if(year>2011,year)),YearQtr,YearMonth,YearMonthWeek,YearMonthDay,REGION_,COUNTRY,GROUP_CLASS,company),'DD/MM/YYYY')

paulyeo11
Valued Contributor II

Re: Why chart 1 date format display as 401218 ?

Hi Sir

Thank you for your help.

But My Question is my below Script only work for when for Yr YrMth YrQtr .

Pick(Match($(Var_P),1,2,3,4,5,6,7,8,9,10),(if(year>2011,year)),YearQtr,YearMonth,YearMonthWeek,YearMonthDay,REGION_,COUNTRY,GROUP_CLASS,company)

But above script not work when i Click on Button YrMthDay. As it display 42418 , Can you advise me how to make it work ?

Paul

Not applicable

Re: Why chart 1 date format display as 401218 ?

What is source for loading your data ?

if it is SQL then int he query itself use cast date for the column...

Re: Why chart 1 date format display as 401218 ?

Hi,

Its because the dates are converted into julian date.

Use Date() function to show it in date format.

Pick(Match($(Var_P),1,2,3,4,5,6,7,8,9,10),(if(year>2011,year)),YearQtr,YearMonth,YearMonthWeek,Date(YearMonthDay),REGION_,COUNTRY,GROUP_CLASS,company)


Regards,

kaushik Solanki

paulyeo11
Valued Contributor II

Re: Why chart 1 date format display as 401218 ?

Hi Kaushik

it is working fine now. many thank. Any idea why add Date infront will solve the problem ?

Paul

paulyeo11
Valued Contributor II

Re: Why chart 1 date format display as 401218 ?

Hi sir

My date is from QV data.

Now it is okay

Paul

Sent from my iPhone

Re: Why chart 1 date format display as 401218 ?

Hi,

Because the Date function will convert the number into date. In your case it was a number which was converted into date by Date function.

Regards,

Kaushik Solanki