Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: Finding the difference between two dates including milliseconds

by annonymous1 (Initiate)
on Jan 11, 2017 at 09:48 UTC ( #1179380=note: print w/replies, xml ) Need Help??


in reply to Re: Finding the difference between two dates including milliseconds
in thread Finding the difference between two dates including milliseconds

Modify: 2017-03-11 15:06:21.724171690 +0530 Wed Nov 9 15:14:20 2017 how to find the 'time' difference between that two files??
  • Comment on Re^2: Finding the difference between two dates including milliseconds

Replies are listed 'Best First'.
Re^3: Finding the difference between two dates including milliseconds
by haukex (Archbishop) on Jan 11, 2017 at 10:20 UTC

    Hi annonymous1,

    Modify: 2017-03-11 15:06:21.724171690 +0530 Wed Nov 9 15:14:20 2017 how to find the 'time' difference between that two files??

    You create two different DateTime::Format::Strptime objects, one for each format, and then apply all the same principles as described in the other posts in this thread.

    Note that the first value already has a time zone specified in the string, while for the second one you should specify a time_zone=>'...' value in the DateTime::Format::Strptime constructor, since it's best to have either none or all DateTime values involved in a calculation to have a time zone specified, not just a few.

    Hope this helps,
    -- Hauke D

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2022-12-09 22:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?