Jump to content

Date Difference


Recommended Posts

Hi Everybody,

I am having two strings in date and time format like 20.07.2009 17:00:20 PM and 20.07.2009 17:02:00 PM. I want to substract the string so as to get the date and time difference. Can anybody help me? . I am using Labview 8.0

Pande

Link to comment
I am having two strings in date and time format like 20.07.2009 17:00:20 PM and 20.07.2009 17:02:00 PM. I want to substract the string so as to get the date and time difference.

I'd convert them to a timestamp datatype and then work on them.

Link to comment

Hi Everybody,

I am having two strings in date and time format like 20.07.2009 17:00:20 PM and 20.07.2009 17:02:00 PM. I want to substract the string so as to get the date and time difference. Can anybody help me? . I am using Labview 8.0

Pande

If you look in the timing pallet, there is a Date/Time to Seconds which takes in a cluster. Parse out your strings, fill in the clusters, convert and subtract.

post-11268-124810846502_thumb.png

Link to comment

Hi Everybody,

I am having two strings in date and time format like 20.07.2009 17:00:20 PM and 20.07.2009 17:02:00 PM. I want to substract the string so as to get the date and time difference. Can anybody help me? . I am using Labview 8.0

Pande

Hi,

You might want to use the "scan from string" primitive (to turn your date string into a timestamp), then cast your timestamp to DBL (actually "second") and then substract the 2 DBLs to have the timne difference in seconds.

See this:

post-7452-124815950129_thumb.png

hope this helps

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.