Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Average start time handling midnight

by gandolf989 (Scribe)
on Jul 21, 2016 at 19:08 UTC ( [id://1168265]=note: print w/replies, xml ) Need Help??


in reply to Average start time handling midnight

There are date functions that will just give you the elapsed time. They should even be able to account for different timezones. http://search.cpan.org/~drolsky/DateTime1.34/lib/DateTime.pm#Datetime_Subtraction Another option is to convert the dates to unix time and subtract, then figure out how many hours, minutes and seconds elapsed. This is a great place to just use a library rather than build something new.
  • Comment on Re: Average start time handling midnight

Replies are listed 'Best First'.
Re^2: Average start time handling midnight
by hippo (Bishop) on Jul 22, 2016 at 08:47 UTC

    It would indeed be a trivial exercise if the date information were available as well as the time of day. However, there's no indication at all in the OP that the date information is present in the data set and that is why it has garnered responses which are as varied as they are many.

    BTW, the URL you included gives a 404, perhaps you meant http://search.cpan.org/~drolsky/DateTime-1.34/lib/DateTime.pm#Datetime_Subtraction?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1168265]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-04-23 06:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found