Can I force a number of digits on a number?

Is it possible to force a number to have a number of digits?

Example force "8" to render as "08"

I'm trying to use this because I want to render a specific date format after having added/subtracted a number of days. Note that I'm not talking about the CURRENT date/time. I want to specify the starting date/

e.g. I specify a start date of 08/15/19 (MM/DD/YY) and I want to subtract 6 days. If I just use a regular equation, it will return 08/9/19. But I want it to return 08/09/19, because that's the format I need to paste into the specific field I want to fill.

You can use the format attribute for the equation command to do this:

No Padding:
Pad number with 0's to a length of two:
{=4+5; format=02}
Pad number with 0's to a length of three:
{=4+5; format=03}

Another example:
{=4+7; format=02}
{=4+7; format=03}

More examples are available here:

1 Like

Neat! Thanks :slight_smile: