Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Epoch to Mysql datetime format

by b10m (Vicar)
on Mar 10, 2004 at 13:56 UTC ( [id://335441]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://335441]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-04-19 04:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found