In Query M language, there is no function which converts Month Name to Month Number so that if I give February or Feb, the result should be 2.
You can use following formula to get the Month Number from Month Name
= Date.Month(Date.FromText("1"&[Month Name])
If your data is using some other locale than whatever is specified in your Power Query, then you will be required to use Culture parameter.
Hence, since my PQ is set to use English as locale and if I get the month names which are Spanish, then I will be using this formula
= Date.Month(Date.FromText("1"&[Month Name],"es-ES"))
You will need to use full month name unlike English locale where first 3 characters can also be used as Month Name parameter.
= Date.Month(Date.FromText("1"&[Month Name])
This I cannot get working on dates that return 2 digit months. So, converting October, November, and December, I'm getting an error. Any idea how this can be fixed?
Update. Solved with:
=Date.Month(Date.FromText("1"&Text.Start([Date.1], 3)))
Being able to create a blog is extraordinary, thank you.
I’ve recently started a blog, the info you provide on this site has helped me greatly. Thanks for all of your time & work.