Announcements
I have a field in which the number 2.7 is displayed. I want this number to be displayed in the format hh:mm. How do I do this?
Can you write more details? Is this a time value in decimal format?
Text(Value(First(Split(Label15.Text,".")).Value),"##") &":" &Text(Value(Last(Split(Label15.Text,".")).Value)*6,"##")
can also wrap with timevalue to make a real time
TimeValue(Text(Value(First(Split(Label15.Text,".")).Value),"##")&":"&Text(Value(Last(Split(Label15.Text,".")).Value)*6,"##"))
How do you want to convert 2.7 into a time value? Is 2.7 intended to be a value in hours?
Then use the formula:
Text(Value(First(Split(TextInput1;".")).Value);"00")&":"&Text(Value(Last(Split(TextInput1;".")).Value)*6;"00")
TextInput1 is the field where you have the 2.7 (or any other value) stored, and then you can create a label with the text generated by the formula above, to show the result as hh:mm, in the case of 2.7 it would show 02:42
Thank you for the quick feedback. I have tried this variant and when I enter 1, I get the number 1:06. More details on my application. The inputs are hours which means it should be shown 1:00 instead of 1:06. The entries can be from 0 min to 10 hours. Is it better to work with minutes? How would the formatting then look in hh:mm?
The number I get is a decimal number, i.e. 0.0, 0.5 and 10 can be anything and should be output in the format hh:mm, i.e. hour and minute, or formatted.
that looks very good! But with 2 hours of work I unfortunately get the result 2:12 instead of 2:00.
I change it to following Text(Int(Value(TextInput1.Text)), "##") & ":" & Text(Round(Mod(Value(TextInput1.Text), 1) * 60, 2), "00") now i am getting 2:00 when the decimal is 2
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 236 Super User 2026 Season 2
WarrenBelz 188 Most Valuable Professional
Mohsin Ali 130