Help on processinf Date String.

2003-09-10 Thread Pandey Rajeev-A19514
Hi ,

I have to start with input as date string which I need to process.
$date1 = Wed Sep 10 15:51:50 CST 2003;
$date2 = 15:52:00.885 cst Wed Sep 10 2003;

I have to find the difference in between the two dates. Which is the best module to do 
that and probably a sample code would do more help.

Regards
Rajeev

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Help on processinf Date String.

2003-09-10 Thread Ramprasad A Padmanabhan
Pandey Rajeev-A19514 wrote:
Hi ,

I have to start with input as date string which I need to process.
$date1 = Wed Sep 10 15:51:50 CST 2003;
$date2 = 15:52:00.885 cst Wed Sep 10 2003;
I have to find the difference in between the two dates. Which is the best module to do that and probably a sample code would do more help.

Regards
Rajeev
use Time::ParseDate;

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Help on processinf Date String.

2003-09-10 Thread Janek Schleicher
Pandey Rajeev-A19514 wrote at Wed, 10 Sep 2003 11:56:01 +0530:

 I have to start with input as date string which I need to process.
 $date1 = Wed Sep 10 15:51:50 CST 2003;
 $date2 = 15:52:00.885 cst Wed Sep 10 2003;

Here's a complete example working with Date::Manip.

use Date::Manip;

my $date1 = Wed Sep 10 15:51:50 CST 2003;
my $date2 = 15:52:00.885 cst Wed Sep 10 2003;

print Delta_Format( DateCalc( ParseDate($date1), ParseDate($date2) ),
1,  # the decimal precision
%hd hours, %md minutes ago (in seconds: %sd) ago );

Greetings,
Janek

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]