Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
mahitham
Creator II
Creator II

Month Help

Hi Experts,

Can any one please help me to extract the Month like Jan, Feb to Jul from the below field.

Month.png

Thanks in advance.

16 Replies
tresesco
MVP
MVP

Ideally, if your field values from source are numbers, the below expression should work.

Month(Date#(Month,'YYYYMM'))

Untitled.png

Could you share your sample qvf ?

manoj217
Creator III
Creator III

Hi Mahitha,

please check in predefined steps in top of the script page consists default script.

change the default date format to our required date format

manoj217
Creator III
Creator III

if it is format error it will shows as null only.

use different date formats.

date(''month",'YYYYMMM')

mahitham
Creator II
Creator II
Author

Hi Tresesco,

Still not working.

Please find the below attached source file and the sample app.

Thanks in advance.

Anonymous
Not applicable

Hi Mahita,

May be try:

Month(Date(Num#(Date#(Month,'YYYYMM')),'MMM-YYYY')) as  Monthname


or

if their is a space in month field at the end ,try -


Month(Date(Date#(Trim(Month),'YYYYMM'),'MMM-YYYY')) as  Monthname

tresesco
MVP
MVP

I see a space between your year and month numbers in excel, in that case you could try like:

Month(Date#(Month,'YYYY MM'))                      // note space between YYYY and MM

Anonymous
Not applicable

Are you using excel as source file?

if not  and space exists in date field try to remove space using mid and index functions