Re: Time Comparison Easier Than I'm Making them

2007-11-28 Thread Rob Dixon
Mathew Snyder wrote: > I've got an application which uses the format -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. Using DateTime->now I get a timestamp of -mm-ddThh:mm:ss. I have no

Re: Time Comparison Easier Than I'm Making them

2007-11-28 Thread Paul Lalli
On Nov 28, 9:50 am, [EMAIL PROTECTED] (Mathew Snyder) wrote: > I've got an application which uses the format -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. Using DateTime->now I get a

Re: Time Comparison Easier Than I'm Making them

2007-11-28 Thread Gunnar Hjalmarsson
Mathew Snyder wrote: I've got an application which uses the format -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';

Re: Time Comparison Easier Than I'm Making them

2007-11-28 Thread Steve Bertrand
>> All I'm trying to do is take the hh:mm:ss portion of each timestamp I completely missed this portion of your message. As per perldoc DateTime: $hms= $dt->hms; ...which will populate $hms with just hh:mm:ss. TFM also states how to do comparisons, additions, subtractions et al. Cheers!

Re: Time Comparison Easier Than I'm Making them

2007-11-28 Thread Steve Bertrand
Mathew Snyder wrote: > I've got an application which uses the format -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. Using DateTime->now I get a > timestamp of -mm-ddThh:mm:ss. I

Time Comparison Easier Than I'm Making them

2007-11-28 Thread Mathew Snyder
I've got an application which uses the format -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. Using DateTime->now I get a timestamp of -mm-ddThh:mm:ss. I have no clue what the 'T' repres