Find middle number using LEFT and RIGHT Formulas

I have a column with dates that look like this 2022-10-18. I am trying to create a formula using LEFT and RIGHT to only give me the month (in this example = 10)


Please help, thanks!

Answers

  • Amber Eakin
    Amber Eakin ✭✭✭✭✭✭

    Hi @Faisal F - Are the dates always YYYY-MM-DD? If so, you can use this (you'll need to substitute your date column name where I've written "Date":

    =MID(Date@row, 6, 2)

    If they are YYYY-M-D if it's 2023-4-4, for instance, this one will work:

    =IF(MID(Date@row, 7, 1) = "-", MID(Date@row, 6, 1), MID(Date@row, 6, 2))

    Please let me know if that helps!

    Amber Eakin, MSLS, M.Ed.

    Adult Education Specialist | Process Improvement Enthusiast

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!