FlyingSpoon Posted February 21, 2018 Share Posted February 21, 2018 Say if I have a number like, 1519257600 How can I convert it to MM:DD:YYYY (22/02/2018) Link to comment
NeXuS™ Posted February 21, 2018 Share Posted February 21, 2018 (edited) rT = getRealTime(1519257600) year = rT.year + 1900 month = rT.month + 1 day = rT.monthday local text = string.format("%02d/%02d/%04d", month, day, year) Try this. Edited February 21, 2018 by NeXuS™ 1 Link to comment
FlyingSpoon Posted February 21, 2018 Author Share Posted February 21, 2018 Works, cheers. Output: 02/22/2018 Link to comment
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