How can I get a 2 digit month to appear with the following formula

Here is the current formula.

=IFERROR(YEAR([Close Date]@row) + "-" + MONTH([Close Date]@row), " ").

The results of this formula are causing sorting errors. I would like the result when the the month is less than 10 to appear with 2 digits. For example, the current result for September 2022 is 2022-9. I would like it to appear as 2022-09. I tried adding an IF statement on the MONTH, but could not get it to work.

Tags:

Best Answer

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!