tune has asked for the wisdom of the Perl Monks concerning the following question:
The result must be acceptable for Mysql's date column type.if ($xpl[2]=~/^(\d+)\/(\d+)\/(\d+)\s+(\d+):(\d+:\d+)\s+([A|P]M)$/) { $xpl[2]=($3+2000)."-".$1."-".$2." ".(($6 eq "PM")?($4+12):$4). +":".$5; }
Thank you in advance.
-- tune
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Date processor
by mr.nick (Chaplain) on Feb 23, 2001 at 22:41 UTC | |
by tadman (Prior) on Feb 23, 2001 at 22:48 UTC | |
by sierrathedog04 (Hermit) on Feb 24, 2001 at 00:17 UTC | |
|
(ichimunki) re: Date processor
by ichimunki (Priest) on Feb 23, 2001 at 22:50 UTC | |
|
Re: Date processor
by tadman (Prior) on Feb 23, 2001 at 22:45 UTC | |
|
Re: Date processor
by enoch (Chaplain) on Feb 23, 2001 at 22:52 UTC | |
|
Re: Date processor
by SilverB1rd (Scribe) on Feb 23, 2001 at 22:39 UTC | |
|
Re: Date processor
by tune (Curate) on Feb 24, 2001 at 00:19 UTC |