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

Store month as 0month

Dear all,

I create a month variable like this:

varCurrentMonth = num(Month(Today()));

This works fine. However, the month in my dataset is denoted like this: 09, 08 etc... Any thoughts on how I can transform the 9 into 09.

7 Replies
t_moutault
Contributor III
Contributor III

hi Marc,

try this varCurrentMonth = num(Month(Today()),'00');

florentina_doga
Partner - Creator III
Partner - Creator III

try this

=if(len(num(Month(Today())))=1,'0'&num(Month(Today())),num(Month(Today())))

Anonymous
Not applicable
Author

may be this?

varCurrentMonth = right(num(Month(Today())),1);

Chanty4u
MVP
MVP

if you have fixed value then try below

nine.PNG

jjbom1990
Creator
Creator

that would mean that when it is oktober the month would be 010, does not seem to be the requested outcome.

sunny_talwar

Try this:

varCurrentMonth = Num(Month(Today()), '00');

Anil_Babu_Samineni

Sometimes, the problem with Date Field,

Perhaps this

varCurrentMonth = Num(Month(Floor(Today(),'DateFieldFormat'),'MM'))


Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful