Sasu Posted January 29, 2015 Posted January 29, 2015 Hello! Can someone help me with my problem? I want to use string.format to get something like this: 00:00.2 but only I could get 00:0.2 with string.format("%02d:%.1f", 0, 0.2) Thanks!
DNL291 Posted January 29, 2015 Posted January 29, 2015 It should work: string.format("%02d:0%.1f", 0, 0.2)
Sasu Posted January 29, 2015 Author Posted January 29, 2015 But if I do: string.format("%02d:0%.1f", 0, 21.2) -> 00:021.2 And I want get 00:21.2 Thanks for helping me!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now