in reply to Epoch to Mysql datetime format - DO NOT USE

I'm not sure wheter you use this to insert epoch values into a MySQL date_time field, if so, why all the hassle? You could easilly use some SQL like this:

INSERT INTO foo VALUES(FROM_UNIXTIME(1078926984));
--
b10m

All code is usually tested, but rarely trusted.

Replies are listed 'Best First'.
Re: Re: Epoch to Mysql datetime format
by zakzebrowski (Curate) on Mar 10, 2004 at 15:26 UTC
    Excellent, thanks. I was unaware of this feature in mysql. (I tend to be more of an oracle sql user than anything else, though I use mysql as a 'staging' area before code is released.) I'll use this in the future.


    ----
    Zak - the office