Android Question DateTime Leading Zeros?

ronovar

Active Member
Licensed User
Longtime User
I have using this to show Hours:Minutes

B4X:
lblTime.Text = DateTime.GetHour(DateTime.Now)&":"& DateTime.GetMinute(DateTime.Now)

That works fine if minutes does not have zeros before...for example this is show correctly:

12:15
12:25
12:35

But when time is:

12:05
12:08
12:01

it is show:

12:5
12:8
12:1

and so on...how to fix this?
 
Top