Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
Randy Weeton
3
Views
3
Comments
Displaying Integers with Leading Zeros
Question
Is there an easy way to display an integer with leading zeros? I need to convert an integer number of minutes to h:mm format.
Nuno Reis
MVP
With an if that returns 0 ou "" to prefix your number.
For a value in minutes to turn into HH:MM the formula is something like this
Mod(Minutes,60)+":"+If(Minutes-Trunc(Minutes/60)<10,"0","")+Minutes
Paulo Ramos
Staff
Hi,
You can also use the FormatText built-in action for adding padding. Check out SS online documentation for more information.
FormatText
(int,
2
,
2
, True,
"
0
"
)
1 reply
25 Jan 2013
Show thread
Hide thread
Randy Weeton
Paulo Ramos wrote
:
Hi,
You can also use the FormatText built-in action for adding padding. Check out SS online documentation for more information.
FormatText
(int,
2
,
2
, True,
"
0
"
)
Thanks for the simple answer Paulo!
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...