Hi all, In article <[EMAIL PROTECTED]>, Rob Hanson wrote:
> There are lots of ways to do this, but I usually use the Date::Parse > module. It converts a date string into seconds (seconds since 1/1/1970). > > use Date::Parse; > > my $hour = 3600; # 1 hour = 3600 seconds > > my $t1 = str2time("12/08/2003, 11:00"); > my $t2 = str2time("13/08/2003, 23:00"); > > my $hours = ($t2 - $t1) / $hour; I just tried this (as written) and $t2 is not initialized. Any ideas why? (whoops, I think I know: locale) If I change the second date to "12/09/2003, 23:00" then I get 36 hrs. -K -- Kevin Pfeiffer International University Bremen A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]