CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
Perl ::duration of time in between dates

 



giridhar276
Novice

Jun 11, 2013, 2:35 AM

Post #1 of 3 (515 views)
Perl ::duration of time in between dates Can't Post

Hello All,

I have two strings with date and time as follows..



Code
$starttime= "06/11/2013 "; 
$starttime= "05:15";
$enddate="06/12/2013";
$endtime="04:45";


dates are in mm/dd/yyyy format and time in military format.
and I am looking the duration of time(in minutes) in between dates.

Could anyone please let me know the logic behind this?

Thanks in advance....


BillKSmith
Veteran

Jun 11, 2013, 3:33 AM

Post #2 of 3 (509 views)
Re: [giridhar276] Perl ::duration of time in between dates [In reply to] Can't Post

Time and Date calculations are much harder than you first think. Use a module! I always use Date::Calc. It may not be the best for any job, but it always gets it done.
Good Luck,
Bill


Laurent_R
Veteran / Moderator

Jun 11, 2013, 11:58 AM

Post #3 of 3 (499 views)
Re: [BillKSmith] Perl ::duration of time in between dates [In reply to] Can't Post


In Reply To
Time and Date calculations are much harder than you first think. Use a module! I always use Date::Calc. It may not be the best for any job, but it always gets it done.


I fully agree.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives