Jump to content

Difference between two dates/times


Recommended Posts

Hi all,

Trying to work with date and time with this format:

mm/dd/yyyy hh:mm:ss (This is the input I have)

What I would like to get:

Output = (date1/time1) - (date2/time2)

I have to find the way to get the difference between to dates/times and I'm not able to do it in Labview although I'm almost sure that it's possible.

Could you guide me a little bit, please?

Thanks in advance.

Kind regards.

Jose.

:worship:

Link to comment
Trying to work with date and time with this format:

  mm/dd/yyyy hh:mm:ss (This is the input I have)

2817[/snapback]

Hi Jose,

I'm assuming that this is a string input you're dealing with.

If so the 'Scan from String' and 'Date/Time To Seconds' functions can be used to obtain a numeric datetime. Attached vi (LV6.1) is variation of what I use. Convert the strings for the two times and then subtract.

Download File:post-55-1101928881.vi

Link to comment
  • 2 weeks later...
Hi all,

Trying to work with date and time with this format:

  mm/dd/yyyy hh:mm:ss (This is the input I have)

What I would like to get:

  Output = (date1/time1) - (date2/time2)

I have to find the way to get the difference between to dates/times and I'm not able to do it in Labview although I'm almost sure that it's possible.

Could you guide me a little bit, please?

Thanks in advance.

Kind regards.

Jose.

:worship:

2817[/snapback]

Here is something that might work for you.

post-17-1102798000.png?width=400

Download File:post-17-1102797995.zip

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.