Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

bilionut
New Contributor II

Month Year format

Hi,

To display in order Month and Year I use this expresion:


dual( Month(MyDate) & '-' & Year(MyDate), num(Year(MyDate)) & num(Month(MyDate), '00' )) as MonthYear,

and the result is something like MMM-YYYY.


How should I change the expression
or what else should I do to change the format display in something like that MMM-YY ?

Thanks for help,

Ionut

Tags (2)
1 Solution

Accepted Solutions
Highlighted
MVP
MVP

Re: Month Year format

Hi Ionut,

Try this instead:

Dual(Month(MyDate) & '-' & Date(MyDate, 'YY'), Num(Year(MyDate)) & Num(Month(MyDate), '00')) AS MonthYear,

Note the Date(MyDate, 'YY') in the expression above.

Hope that helps.

Miguel

3 Replies
Highlighted
MVP
MVP

Re: Month Year format

Hi Ionut,

Try this instead:

Dual(Month(MyDate) & '-' & Date(MyDate, 'YY'), Num(Year(MyDate)) & Num(Month(MyDate), '00')) AS MonthYear,

Note the Date(MyDate, 'YY') in the expression above.

Hope that helps.

Miguel

Month Year format

Hi,

Create date field some thing like this

dual( Month(MyDate) & '-' & Year(date(MyDate,'DD.MM.YY')), num(Year(MyDate)) & num(Month(MyDate), '00' )) as MonthYear,

Regards,

Anand

bilionut
New Contributor II

Month Year format

It work!

Thanks a lot

Ionut