It looks like part of your message got munged by one of our mail
clients, but here's a code snippet that should give you an idea of how
you can proceed:
##################
use strict;
use warnings;
$| = 1;
my $string = '200607081000@@01510';
#Check to make sure the regex matched, then proceed.
if($string =~ /^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})[EMAIL PROTECTED]@(\d+)$/){
$string = "$1-$2-$3 $4:$5 => $6";
print $string;
}else{
print "Invalid String!\n";
}
#################
-----Original Message-----
From: Semiyi.Abiola [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 12, 2006 1:10 AM
To: [email protected]
Subject: Date Time
Hi,
I got a file with this line:
200607081000@@01510
It means Datetime@@Values
I'm trying to insert this in Mysql with fields terminated by `@@`';
It's works fine but i got the wrong Datetime.
How kann i change 200607081000 <mailto:200607081000@@01510> into
2006-07-08 10:00 <mailto:200607081000@@01510>
Please Help
Thanks
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>