Using LEFT formula for extracting a month from a full date, 0 in month missing
Hello,
I am using a Left and Right column formula to extract the Month and Year from a full date column. The formula is successful, however, it is returning only the month number that is not 0.
01/12/2022=LEFT(MONTH [Date], 2) + "/" + RIGHT(YEAR [Date], 2) = 1/22
I need it to return 01/22 to ensure I can properly sort the data in the reports.
Thank you in advance for any assistance you can provide!
-Hannah
Best Answer
-
Try this:
=IF(MONTH(Date@row)< 10, "0", "") + MONTH(Date@row) + "/" + RIGHT(YEAR [Date], 2)
Answers
-
Try this:
=IF(MONTH(Date@row)< 10, "0", "") + MONTH(Date@row) + "/" + RIGHT(YEAR [Date], 2)
-
Yay! Thank you @Paul Newcome! That worked beautifully, thank you!
-
Happy to help. 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 66K Get Help
- 429 Global Discussions
- 149 Industry Talk
- 488 Announcements
- 5.2K Ideas & Feature Requests
- 85 Brandfolder
- 152 Just for fun
- 74 Community Job Board
- 499 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 305 Events
- 36 Webinars
- 7.3K Forum Archives
Want to practice working with formulas directly in Smartsheet?
Check out the Formula Handbook template!
Check out the Formula Handbook template!