Forum Discussion
Extract a Date from the Month Name
I have a data pull that lists months by the 3-digit version of their name (e.g., Jan, Feb, Mar). I need Power BI to extract the date from this text string, but it isn't recognizing it, and returns an error. How can I get it to parse the information, and return a date set to the first of the month listed (i.e., 1/1/2023, 2/1/2023, 3/1/2023)?
If I absolutely have to, I can do a Find/Replace for each month, then parse, but it really boggs down the query, and causes things to break later. The other manual option is to do the find/replace in Excel, which is the data source. Again, sub-optimal.
Any insight would be much appreciated!
You can build the text string e.g. Text.Combine({"1 ", [Column1], " 2023"} then change the datatype to date
1 Reply
- HotChilli
Community Champion
You can build the text string e.g. Text.Combine({"1 ", [Column1], " 2023"} then change the datatype to date