
Not applicable
2016-06-30
12:17 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to convert a month name to a month number on the fly
Can someone shed some light on converting a month name to a month number on the fly? (January = 1)
Henry suggested the reverse conversion on a thread from month number to month name: Month(MakeDate(2012,MonthNo))
Thanks,
Xinzhen
21,298 Views
1 Solution
Accepted Solutions

MVP
2016-06-30
12:47 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If MonthName is read as a true date field then simply doing Num(MonthField) should give you the Month Number. If MonthName is read as a text, you can try this:
Num(Month(Date#(MonthName, 'MMMM')))
2 Replies

MVP
2016-06-30
12:47 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If MonthName is read as a true date field then simply doing Num(MonthField) should give you the Month Number. If MonthName is read as a text, you can try this:
Num(Month(Date#(MonthName, 'MMMM')))

Not applicable
2016-06-30
01:50 PM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Sunny. That worked!
Xinzhen
20,353 Views
