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

How to convert period to month name

Hi

I have vRunMonth = 007 and am trying to create another variable with monthname

mPeriod = month($(vRunMonth ))

I want it to be Jul but i see jan.

Can someone please help me asap.

Thanks!

6 Replies
maxgro
MVP
MVP

try

=month(makedate(2015,vRunMonth))

chaper
Creator III
Creator III

How are you calculating vRunMonth.Is it a passed value from a selection?Instead of using vRunMonth use orginal calculation.

krishna_2644
Specialist III
Specialist III

Month(number)  returns the month name in which the number/datenumber falls.

Eg : month(10) - gives january - as 10 is the 10th day in the year of 365 days starting from jan 1st(1)

       month(91) - gives march

       month(212) - gives july.

so you have to convert the date number to month first.

As maxgro‌ suggested try making a date with that expression first then the month name.

Thanks

chaper
Creator III
Creator III

If vRunMonth value is not calculated value from date field then Massimo solution is perfect.

MarcoWedel

‌Month(Date#($(vRunMonth),'M'))

regards

Marco

Clever_Anjos
Employee
Employee

Trick way

=SubField(MonthNames,';',vRunMonth)

MonthNames is a predefined variable