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.


Tags:

Best Answers

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

  • SIS
    SIS ✭✭

    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.

  • Heath Hilton
    Heath Hilton ✭✭
    Answer ✓

    SIS,

    I see that you shortened the month names but yes that looks great.

    Hope this helps!

    Heath Hilton

  • @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

  • @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,
    Genevieve

    Need more help? 👀 | Help and Learning Center

    こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!