### Title

Controlling the number of digits in a number (not a decimal)

### Post

How do I make a number three digits always? I use the Day OF The Year in my [ProjectNumber] field and I want it to always be 3 digits long, so February 1 would be 032.

I also need to extract the last two digits of the primary key [OrderID].

This will prevent incorrect Sorting by [ProjectNumber] when 200932123 (job 123 on February 1, 2009) is not actually "smaller" than 2008132132 (job 132 on May 11, 2008).

In a perfect world the two numbers would be 200813232 and 200903223; which is 4 digit year & 3 digit day of year & last 2 digits of ID.

Thanks,

Jack sends

FMP 9, iMacOSX

Try:

Year & SerialIncrement("000", Day OF The Year) & Mod(OrderID, 100)