Mathew Snyder wrote:
I've got an application which uses the format yyyy-mm-dd hh:mm:ss for its
timestamping. I'm trying to determine if the time a record was created was 5 or
more minutes before the time the script runs.
use Date::Parse;
my $rectime = str2time '2007-11-28 16:40:11';
print $rectime + 300 <= time ? '5 or more' : 'Less than 5',
" minutes\n";
All I'm trying to do is take the hh:mm:ss portion of each timestamp and find the
difference
What if the record was created at 23:58?
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/