Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Timestamp help

by pajout (Curate)
on Sep 13, 2008 at 19:28 UTC ( [id://711160]=note: print w/replies, xml ) Need Help??


in reply to Timestamp help

I recommend to explore rdbms built-in datetime types and functions. Perhaps you will find something like as StrToDateTime(pattern, string), which will allow to do something like as
INSERT INTO mytable (mytimestamp) VALUES (StrToDateTime("%month %day %h24:%mi:%ss.%xxx",?));
Attention: Pattern used in insert is not real.

Or, you can reformat the timestamp in Perl code (as advised above) into rdbms native string format of timestamp - some rdbms automatically convert properly formatted string to timestamp.

But, in both cases, your code will depend on rdbms capabilities.

Replies are listed 'Best First'.
Re^2: Timestamp help
by LesleyB (Friar) on Sep 13, 2008 at 22:19 UTC

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (2)
As of 2024-04-26 07:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found