Do you know where your variables are? | |
PerlMonks |
Looking for an efficient way to do datetime transferby lihao (Monk) |
on Mar 30, 2010 at 17:20 UTC ( [id://831906]=perlquestion: print w/replies, xml ) | Need Help?? |
lihao has asked for the wisdom of the Perl Monks concerning the following question: I am looking for an efficient Perl way to replace the following bash command or MySQL statement
Both export '2010-03-17'. I need to find a reliable and efficient Perl way or a small neat Perl module to handle the same thing, any recommendations? Thank in advance lihao Update: Thanks guys for all suggestions. I am actually looking for some lighter solution or new Perl modules which I don't know. the target is to transfer the parsed Excel datetime into MySQL datetime format. In some 32-bit Linux box, i.e. 32bit RHEL5, the -d switch on the date command does NOT work for all datetime. Since I only care about the exact date instead of time, I am using the following formula to handle the date transfer(where 2209143600 is the second from "1899-12-30 00:00:00" on local to "1970-01-01 00:00:00" by a bash line date -d '1899-12-30 00:00:00' +%s)
Back to
Seekers of Perl Wisdom
|
|