Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Month-Year from Date

Hi, I have a field OrderDate field, By this i have created the year, moth, Week

in this month i get 1 to 12 as a integer value

But i want YearMonth in

YearMonth

************

Jan-2012

Feb-2012.... and so on

how i can get this.

Please  help me

1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

The best way (in my mind) is to use

     Date(MonthStart(OrderDate), 'MMM-YY') as YearMonth

HIC

View solution in original post

10 Replies
Anonymous
Not applicable
Author

Try using the MonthName() function.

senpradip007
Specialist III
Specialist III

Use this

MonthName([Calendar Date]) .

[Calendar Date] should be in "YYYY/MM/DD" format.

sasikanth
Master
Master


HI

Set the Date formt to 3-JAN-2012 like this

and then  use MID(3-JAN-2012,3,10) --- gives JAN-2013

Not applicable
Author

Thank you so much i works.

If i need MonthYear in the format

MonthYear

***********

Jan-12

Feb-12

How can i get. please tell me

Anonymous
Not applicable
Author

date ( MonthName ( [YourDate] ) , 'MMM-YY' )

hic
Former Employee
Former Employee

The best way (in my mind) is to use

     Date(MonthStart(OrderDate), 'MMM-YY') as YearMonth

HIC

senpradip007
Specialist III
Specialist III

Try this

Date([Date Field], 'MMM-YY')

Not applicable
Author

Thank you Mr.Henric Crostrom.

I got the answer.

its_anandrjs

You also try this way also

Date(MonthName(OrderDate), 'MMM-YY') as YearMonth