in reply to conversion of a timestamp
If you are pulling this from a database, I would look for a function in the database for doing the formatting. Most databases have such a function (mysql has date_format() as I recall), and it will be easier to follow in SQL rather than break it up and putting it back together in Perl.