Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
can some one guide me how can we derive the month number
example : I have value as August 2023 in one month field from that i want to derive value as just "8" which is august month number.
I am not sure... But try:
text(Num(Month(Date#(MonthYear, 'MMMM, YYYY'))),'00')
Which... should store the value as a string with a preceding zero if less than 10?
Num(Month(Date#(MonthYear, 'MMMM YYYY'))) as MonthNumber
In an expression, if the column is already a time, just use
=Num(Month(your_variable))
Thank you, I am not getting any values, may be is it due to comma in my values?
Num(Month(Date#(Start_Month_and_year, 'MMMM YYYY')))
That's just a different format. Try adding the comma:
Num(Month(Date#(MonthYear, 'MMMM, YYYY'))) as MonthNumber
Hi,
Thank you so much , right now i am getting what i need. can we get "04" instead of 4 i mean from jan to sep i am getting like single number like 1 , 2 ,3 instead of that i need like 01, 02, 03,04 for Jan, feb, march , april.
again from Oct, nov, dec we are ok. we are getting double digit.
I am not sure... But try:
text(Num(Month(Date#(MonthYear, 'MMMM, YYYY'))),'00')
Which... should store the value as a string with a preceding zero if less than 10?
In cases like this, I'd typically advise you just spell out the options using Pick(Match()) and not work so hard to do it using date functions. It's not as "clean" but it works and it's quick.
Pick(WildMatch(DateField,'January*','February*'),'01','02')
Num(Month(Date#(MonthField, 'MMMM, YYYY')),'00') as MonthNumber