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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
bilionut
Contributor III
Contributor III

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

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

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

View solution in original post

3 Replies
Miguel_Angel_Baeyens

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

its_anandrjs
Champion III
Champion III

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
Contributor III
Contributor III
Author

It work!

Thanks a lot

Ionut