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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
abhaysingh
Specialist II
Specialist II

Month Format

Dear All,

i have month in

1,2,3,4,5,6,7,8,9,10 format

i want it in 01,02,03,04,05,06,07,08,09,10 format

how i can do this?

1 Solution

Accepted Solutions
Anonymous
Not applicable

use num(month,'00')

View solution in original post

9 Replies
Anonymous
Not applicable

use num(month,'00')

MK_QSL
MVP
MVP

Date(Date#(Month,'M'),'MM') as Month

hariprasadqv
Creator III
Creator III

Linder is right, in a simple way.

anbu1984
Master III
Master III

=Right('0'&Month,2)

Not applicable

Try this instead:

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

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

mukesh24
Partner - Creator III
Partner - Creator III

Hi Abhay,

As suggested by Linder, simple way use num(month,00)

Not applicable

Hi,

You can try this,

IF(LEN(MONTH_field)=1,month(month#(MONTH_field,'M'),'MM'),if(LEN(MONTH_field)=2,month(month#(MONTH_field,'MM'),'MM')))

Not applicable

Hi try this expression also

Date((YourDateField,'MMM-YY') as YourDateField

Not applicable

Hi,

You can try this in script,

IF(LEN(MONTH_field)=1,month(month#(MONTH_field,'M'),'MM'),if(LEN(MONTH_field)=2,month(month#(MONTH_field,'MM'),'MM')))   as   month