Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

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

by haukex (Archbishop)
on Jan 11, 2017 at 10:20 UTC ( #1179383=note: print w/replies, xml ) Need Help??


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

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

  • Comment on Re^3: Finding the difference between two dates including milliseconds
  • Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2022-12-05 21:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?