in reply to Re^2: date to epoch
in thread date to epoch
However consider using character-classes (e.g. \d for a digit) and checking if $date is really in in the expected format instead of this "quick and dirty" solution.# assumption: yyyymmddhhmmss $date =~ /(....)(..)(..)(..)(..)(..)/; my $year = $1; my $month = $2; ... my $sec = $6;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: date to epoch
by Renjith777 (Initiate) on Nov 15, 2011 at 09:19 UTC | |
by marto (Cardinal) on Nov 15, 2011 at 09:34 UTC | |
by Renjith777 (Initiate) on Nov 15, 2011 at 09:25 UTC |