#!/usr/bin/perl -l use strict; use warnings; use DateTime; use DateTime::Format::Natural; my $parser = DateTime::Format::Natural->new; my $extract_string = "Date: 02.07.2011 16:14:48"; my $date_string = $parser->extract_datetime($extract_string); my $dt = $parser->parse_datetime($date_string); my $epoch_time = $dt->epoch; print $epoch_time;
In reply to Re^2: Not able to ParseDate lines from a file
by Khen1950fx
in thread Not able to ParseDate lines from a file
by xpl0it
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |