WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Time formating. (https://www.wowinterface.com/forums/showthread.php?t=42568)

Grimsin 02-08-12 01:36 PM

Time formating.
 
So i have been using this to format to a normal 12 hour clock format based on my client time. How do i get it to format for 24 hours? like military time?

Code:

GUI_DashClock.text:SetText(("%d:%s"):format(tonumber(date("%I")), date("%M%p"):lower()))

Ailae 02-08-12 02:38 PM

Check here: http://www.lua.org/pil/22.1.html

%I is hours in 12 h format, while %H is 24 h.


All times are GMT -6. The time now is 03:13 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI