Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: Date Convert

by Anonymous Monk
on Jan 09, 2013 at 20:42 UTC ( #1012569=note: print w/replies, xml ) Need Help??

in reply to Date Convert

Use a date/time Perl object type that is friendly to DBI and specify the date value as a parameter to the query, so that DBI will recognize that the parameter is a binary value of date/time type and will bind to the parameter accordingly. Don't present it as a character string if you can avoid it. (Strange things can happen such as code that works in America but not in Europe where the "locale" is different: is "01/09/2012" January 9th or September 1st?)

Replies are listed 'Best First'.
Re^2: Date Convert
by Anonymous Monk on Jan 09, 2013 at 20:50 UTC
    Thats the issue, to convert a string like "01/09/2012" into this date/time Perl object type that is friendly to DBI like you mentioned.
Re^2: Date Convert
by HelenCr (Monk) on Apr 19, 2013 at 13:26 UTC

    AM: your post sounds like the right thing. Can you please give a little code example, how to do it?

    Many TIA

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1012569]
choroba played with the band on Saturday, so Sunday was very sleepy
[choroba]: managed to release Syntax::Construct with 5.28 support in the night, though
[Corion]: choroba: Whee ;)
[Corion]: marto: Ouch - I would've thought that kids adapt much better, but that's obviously not the case...
[marto]: well, their mother let them sleep till 15:00 & 12:00 last week, which didn't help them adjust :P
[Corion]: I was "productive" over the weekend in the sense that I revived my old "Perlmonks on SQLite" code, which likely means I can get a test instance back up running on my webhost. Small steps :)
[Corion]: marto: Ow, no, that doesn't help at all :)
[choroba]: Related to the new release, anyone could explain this or this tester report?
[Discipulus]: hello crew! marto thanks for the message: but I how can I help? i'm testing cpan Padre atm problem with Client::Debug
[choroba]: I don't happen to have 5.10.0 nor 5.8.5 handy...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (11)
As of 2018-06-25 08:40 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.