Unix timestamp -> Time object

Andreas Schwarz usenet@andreas-s.net wrote in message news:slrnbbdl37.12d.usenet@home.andreas-s.net

I get a DATETIME field from a MySQL DB and am looking for an easy way to
format it. In PHP I would have used date(formatstring, time), what is
the best way to do it in Ruby?

SELECT it from MySQL as a numeric field, then use Time.at

SELECT time + 0 FROM table
^^^ this makes MySQL give you an integer

Regards,

Tom