Using date to create Invoice numbers

Hello I am trying to make an invoice number in the format TYYYY-MM-XXX where X is a random number.

The formula I am suing is CONCATENATE("T", YEAR(NOW()),"-", MONTH(NOW()), "-", RANDBETWEEN(100,999) )

I am getting T2022-2-123 as an example

The problem is month value of lets say February only returns 2 not 02 which changes my invoice length. 

Is there a simple simple solution for this?

Thanks

Solved Solved
0 1 440
1 ACCEPTED SOLUTION

Use the TEXT() expressions date/time formatting options, instead of YEAR() and MONTH()

https://help.appsheet.com/en/articles/3517328-text

View solution in original post

1 REPLY 1

Use the TEXT() expressions date/time formatting options, instead of YEAR() and MONTH()

https://help.appsheet.com/en/articles/3517328-text

Top Labels in this Space