Hi,
How can I turn "3" into "03". It's for a clock or a counter.
thanks
SB
by the way, is it possible to get the rests after a modulo ?
number display and format
- rlgsbt
- Member
- Posts: 201
- Location: Marseille
- Contact:
Thanks 23fx23,
Substract modulo result from original value is good ! but for concat string, I want to have 2 digits (from 01 to 59) even if the input is 1, 2, 3 ( I want to turn it in 01, 02, 03... 10, 11...).
Substract modulo result from original value is good ! but for concat string, I want to have 2 digits (from 01 to 59) even if the input is 1, 2, 3 ( I want to turn it in 01, 02, 03... 10, 11...).
-
23fx23
- Member
- Posts: 2548
one of the possible solutions is to add & concat the 0 string, ie take your 1,2,3 ect value, convert to string using 'int to string', this feed input 2 of concat string module. on first input of concat string module type the 0. this will add a 0 before all incoming numbers, so will get a result like 01,02,03... then 010, 011 ect.
then if want only displaying 10 instead of 010, can use an extract sub-array to keep only 2 last digits. (as text is array)
ie on the module set the length to 2 and the start pos is connected to a if a>9. so you would get back 01,02,... 10,11
then if want only displaying 10 instead of 010, can use an extract sub-array to keep only 2 last digits. (as text is array)
ie on the module set the length to 2 and the start pos is connected to a if a>9. so you would get back 01,02,... 10,11
