AMARANT Posted May 10, 2015 Posted May 10, 2015 Hi there. I need to format my string (actually it is a number) to time formatted string, e.g. "300" to "05:00", "16" to "00:16", etc. Please help me.
Walid Posted May 10, 2015 Posted May 10, 2015 Try to use string.format("%02d:%02d",.......,...........) Do not yield your back to your enemy, might feel something strange in your ass. Two things are infinite the universe and human stupidity and i'm not sure about the universe. UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators
3B00DG4MER Posted May 10, 2015 Posted May 10, 2015 Use this better https://wiki.multitheftauto.com/wiki/FormatDate SAF/SAO - 30% Skype: Themerzoug2020 in-game name:3B00DG4MER
MTA Team botder Posted May 10, 2015 MTA Team Posted May 10, 2015 Use this betterhttps://wiki.multitheftauto.com/wiki/FormatDate The read-ability might be better, but performance-wise it's crap. Here is the code: local seconds = 330 local time = ("%02d:%02d"):format(math.floor(seconds / 60), seconds % 60) GitHub: Debug Console • MTA-Discord Relay Scripting: How to draw a line chart with DirectX functions? • Doppler Effect in MTA • Get the client's FPS • Customizable Blur Shader
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