How to work on a formula to display 2 digit value?

With reference to the above, we are trying to create a Serial Number with a few combination of data. One of it is the month and year submitted.
I am using the MONTH(@cell) and YEAR(@cell) formula (as shown in the screenshot) to obtain the month and year.
Is there any formula to convert it into a 2 digit value as follows?
Month: 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12
Year: 22 for 2022, 23 for 2023 ...
Appreciate assistance.
Vivien Chong
Modern Work Management Consultant @ 57Network Consultancy Sdn Bhd
Connect with us: 57network.com
Best Answer
-
You could try the following,
For Month column:
=RIGHT(100 + MONTH([Date Submitted]@row), 2)
This will add 1 at the beginning of the number, and then strip the first character, so this way it will trick the sheet into displaying 2 digit long including the leading 0.
For the Year column:
=RIGHT(YEAR([Date Submitted]@row), 2)
This should keep the last 2 digits of the 4-digit year.
Kevin
Answers
-
You could try the following,
For Month column:
=RIGHT(100 + MONTH([Date Submitted]@row), 2)
This will add 1 at the beginning of the number, and then strip the first character, so this way it will trick the sheet into displaying 2 digit long including the leading 0.
For the Year column:
=RIGHT(YEAR([Date Submitted]@row), 2)
This should keep the last 2 digits of the 4-digit year.
Kevin
-
thanks @Kevin St-Pierre . The formula works. I know it can be done. Just don't know how.
Vivien Chong
Modern Work Management Consultant @ 57Network Consultancy Sdn Bhd
Connect with us: 57network.com
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 68K Get Help
- 474 Global Discussions
- 209 Use Cases
- 517 Announcements
- 5.6K Ideas & Feature Requests
- 87 Brandfolder
- 157 Just for fun
- 85 Community Job Board
- 521 Show & Tell
- 36 Member Spotlight
- 3 SmartStories
- 309 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!