Can we display the number "1", as "01" using variables?

Oct 23, 2015

I am trying to display the number "1", as "01" using variables. But not able to do it can anybody suggest anything on it? 

4 Replies
Jan Vilbrandt

Yes, you can :-) , but there is no built in formatting option like in Excel. So you have to do some formatting on your own.

Let's assume, you have a variable called "numbervalue" which contains your number.

You have to create a spacer-variable which is "" (=empty) when the number, the "numbervariable" contains, is greater or equal 10. Set the spacer-variable to "0", when the value is less than 10.

This does only work on numbers greater or equal 0, no negative numbers allowed. ;-)

In a TextBox (e.g. titled "Score") you would enter the following:

%spacervariable%%numbervalue%

spacervariable is either "0" or "" (empty)

The shown result would be:

Score: 00

Score: 09

Score: 10

This discussion is closed. You can start a new discussion or contact Articulate Support.