Since you are posting in Shell & Bouncer Help, I assume you are writing a shellscript?
In such case, that would somewhat depend on your shell. Most do provide the date binary, which generally supports formatting (see http://unixhelp.ed.ac.uk/CGI/man-cgi?date ).
Something like this should do the trick (bash-style, other shells may have different syntax):