My list has a field for report month. The month is selected from a list and is displayed in text format (Jan, Feb, etc.) For sorting puposes, I want to add a calculated column that will assign the month's numeric value (01, 02, etc.). Any help writing the formula would be extremely, greatly appreciated. Thank you in advance.
1 Answer
You will need to convert the Text date
into Date
and then extract the month
.
Try this:
=MONTH(DATEVALUE(CONCATENATE("1-",MonthColumnName)))
1 being the first day of the month (and a dash) is added to convert text into date
-
Although my own situation uses fully spelled-out month names, and thus requires a different syntax within the DATEVALUE function, this answer still gave me enough to figure out what I needed. Commented Jul 23, 2018 at 15:37