in reply to Converting localtime to SQL format
UPDATE: I added $M++ which was not not there as per crenz's warnings.my $time = do { my ($s,$m,$h,$D,$M,$Y)=localtime; $Y+=1900; $M++; "$Y-$M-$D $h:$m:$s" };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Converting localtime to SQL format
by crenz (Priest) on Mar 30, 2005 at 08:55 UTC | |
by blazar (Canon) on Mar 30, 2005 at 09:04 UTC |