Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Perl and Compatibility w/SQL datesby nmerriweather (Friar) |
on Sep 02, 2002 at 23:26 UTC ( [id://194651]=perlquestion: print w/replies, xml ) | Need Help?? |
nmerriweather has asked for the wisdom of the Perl Monks concerning the following question:
i've gone just about crazy today, realizing all my code is off by a month...
Perl deals with months 0 based, while MySQL treats months 1 based. I'm assuming Oracle and other DBs do the same. How do you all deal with this? Force a 0-based date into MySQL, instead of letting it compute FROM_UNIXTIME? or use a few substr() on dates you pull out to drop the month back 1? maybe there's some builtin function that can handle this? i'm kind of stressed and not happy right now, realizing i wrote several thousand lines of code i've got to now edit.
Back to
Seekers of Perl Wisdom
|
|