How to extract just the month name from a date
Hi all,
I'm trying to extract month name from the date column. It has been giving me an error. Any input will be highly appreciated.
Best Answers
-
SIS,
I see that you shortened the month names but yes that looks great.
Hope this helps!
Heath Hilton
-
Nested IFs are useful when you need the full month name, but for three digit month names you can use a much simpler formula:
=MID("JanFebMarAprMayJunJulAugSepOctNovDec", (Mth@row * 3) - 2, 3)
Answers
-
SIS,
Here is the formula that I was able to come up with. You would need to have the formula below in the [Month] column.
=IF(MONTH([Shipped Date]@row) = 1, "January", IF(MONTH([Shipped Date]@row) = 2, "February", IF(MONTH([Shipped Date]@row) = 3, "March", IF(MONTH([Shipped Date]@row) = 4, "April", IF(MONTH([Shipped Date]@row) = 5, "May", IF(MONTH([Shipped Date]@row) = 6, "June", IF(MONTH([Shipped Date]@row) = 7, "July", IF(MONTH([Shipped Date]@row) = 8, "August", IF(MONTH([Shipped Date]@row) = 9, "September", IF(MONTH([Shipped Date]@row) = 10, "October", IF(MONTH([Shipped Date]@row) = 11, "November", IF(MONTH([Shipped Date]@row) = 12, "December"))))))))))))
Here is what it exports on the sheet.
Let me know if it helps.
Hope this helps!
Heath Hilton
-
Thanks,
Thanks so much, Heath! I was trying that formula and was getting an error! What is your thought on the formula I'm trying? it is a workaround based on yours.
-
SIS,
I see that you shortened the month names but yes that looks great.
Hope this helps!
Heath Hilton
-
How does the formula works if the Shipping date is empty and the formula need to refer to another date field with the same changes from "Month Number -> Month Name".
e.g. use MONTH from [field 1]@row and change it to Name, if error use MONTH from[ field2]@row and change it to Name.
KR Christin
-
Hi @Christin F.
You can add an IFERROR statement around the first MONTH function to evaluate if the cell is blank or not. If it is blank, have it look at your second column instead:
=IF(IFERROR(MONTH([field 1]@row), MONTH([field 2]@row)) = 1, "January",
And so on. Does that make sense?
Cheers,
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
Nested IFs are useful when you need the full month name, but for three digit month names you can use a much simpler formula:
=MID("JanFebMarAprMayJunJulAugSepOctNovDec", (Mth@row * 3) - 2, 3)
-
@Genevieve P. I tried adding the if error part and now it's saying invalid data type. Unsure what the issue is?
=IF(IFERROR(MONTH([Date Charged]@row),MONTH([Date Charged]@row)) = 1, "January", IF(MONTH([Date Charged]@row) = 2, "February", IF(MONTH([Date Charged]@row) = 3, "March", IF(MONTH([Date Charged]@row) = 4, "April", IF(MONTH([Date Charged]@row) = 5, "May", IF(MONTH([Date Charged]@row) = 6, "June", IF(MONTH([Date Charged]@row) = 7, "July", IF(MONTH([Date Charged]@row) = 8, "August", IF(MONTH([Date Charged]@row) = 9, "September", IF(MONTH([Date Charged]@row) = 10, "October", IF(MONTH([Date Charged]@row) = 11, "November", IF(MONTH([Date Charged]@row) = 12, "December"))))))))))))
-
Hi @Btrombler
Do you have two dates to verify or just one? The suggestion of IFERROR is if you have 2 date cells to evaluate.
Based on your formula, it looks like you only have one date, which means you could use @John C Murray's easy version!
=MID("JanFebMarAprMayJunJulAugSepOctNovDec", ([Date Charged]@row * 3) - 2, 3)
Cheers,
GenevieveNeed more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 439 Global Discussions
- 138 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 67 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!