By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,834 Members | 2,234 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,834 IT Pros & Developers. It's quick & easy.

Date difference between two dates

P: 5
I have few dates in the format : ' Wed Mar 4 03:11:59 2009 '. I wish to find the difference in days between those dates with current date-time.

I am using DateTime::Format::Strptime module at top. The dates I am getting from DB table in integer format. So converted that in normal date format with code :

$ptime= scalar localtime($row[3]);

And this $ptime is having date in the format ' Wed Mar 4 03:11:59 2009 '. I got find the day diff with current day.

How to do that in perl. Please help...
Apr 24 '09 #1
Share this Question
Share on Google+
1 Reply


eWish
Expert 100+
P: 971
Have a look at CPAN for a date module. There are several that can handle your request.

--Kevin
Apr 25 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.