Server crashes when using"%OH")

So I am trying to get the date in a string that looks like: “10/1/2014 7:07:46”

When ever I use the %OH tag to get the hour the server just crashes.

local date ="%d/%m/%Y %OH") //this makes the server crash
local ply = nil
local plyStr = nil


Some of the tags will crash the server as soon as you try to use them, it’s been that way for a long time I think.

There’s a whole list of the tags here

There’s a note at the bottom of the page about some of them causing crashes, probably not an exhaustive list though.

Any invalid flag will crash on Windows (other systems will depend). You should only use flags documented on both and

I do it like this for nicely formatted date/time:

You can use date.hour%12 if you want 12 hour clock.