search this site also, I made a post soem time ago about the use of sysutils to do what you want.

Have a look at it The format function also works for making 24 hour/12 hout clock etc etc etc and was also mentioned on same thread.