tufanv Expert Licensed User Longtime User Sep 20, 2016 #1 Hello I use dateutils to find remaining time to another time with period: B4X: kalan(3).Text ="Remaining Time : " & t.Hours&":"&t.Minutes&":"&t.Seconds My problem is lets say 12 hours 8 minutes and 42 seconds left : It prints liek this : 12:8:42 . I want it to be 12:08:42 ( it is same for the hour and second also i I also want to display them like than when it is 1 digit ) Any way to do this ? TY
Hello I use dateutils to find remaining time to another time with period: B4X: kalan(3).Text ="Remaining Time : " & t.Hours&":"&t.Minutes&":"&t.Seconds My problem is lets say 12 hours 8 minutes and 42 seconds left : It prints liek this : 12:8:42 . I want it to be 12:08:42 ( it is same for the hour and second also i I also want to display them like than when it is 1 digit ) Any way to do this ? TY
DonManfred Expert Licensed User Longtime User Sep 20, 2016 #2 Use Smart String-Literal Something like B4X: $"Remaining Time :$2.0{t.Hours}:$2.0{t.Minutes}:$2.0{t.Seconds}"$ Upvote 0
Use Smart String-Literal Something like B4X: $"Remaining Time :$2.0{t.Hours}:$2.0{t.Minutes}:$2.0{t.Seconds}"$
tufanv Expert Licensed User Longtime User Sep 20, 2016 #3 DonManfred said: Use Smart String-Literal Something like B4X: $"Remaining Time :$2.0{t.Hours}:$2.0{t.Minutes}:$2.0{t.Seconds}"$ Click to expand... Works perfect ! Thank you very much ! Upvote 0
DonManfred said: Use Smart String-Literal Something like B4X: $"Remaining Time :$2.0{t.Hours}:$2.0{t.Minutes}:$2.0{t.Seconds}"$ Click to expand... Works perfect ! Thank you very much !