Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Convert JAN FY2011 into Month Number

Hi,

I am trying to convert "JAN FY2011" into Month Number.

QlikView would not understand the above format as date, so I need to get the Month Number and Year Number.

I get the Year Number by using Right(Field,4)

But how do I convert the Month Name into Month Number ?

Regards,

Chinmay

1 Solution

Accepted Solutions
deepakk
Partner - Specialist III
Partner - Specialist III

hi,

You can work around in below way

date(date#(left(field,3),'MMM'),'MM') . this will giev you JAN as 01.

View solution in original post

3 Replies
deepakk
Partner - Specialist III
Partner - Specialist III

hi,

You can work around in below way

date(date#(left(field,3),'MMM'),'MM') . this will giev you JAN as 01.

Not applicable
Author

Thanks Deepak

This works but when I try to add 2 to this number is gives a strange result ?

For Jan it gives 1 but when i add 1 to it eg. =date(date#(left(MonthName,3),'MMM'),'MM') +1 it gives me -362

Not applicable
Author

Ok got it working thanks for ur help buddy :

num(month(date#(left(MonthName,3),'MMM'))) +3