LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create Time Stamp Adder??

Hello,

I want to create a Time Stamp Adder, it's operated like this
2007/08/28 08:00:00 +1 day.2hr.3.min.4sec.
=2007/08/29 10:03:04

I want to use it to make a schedule with MEMO.

How can I make this ADDER??

Thank You [;)]
0 Kudos
Message 1 of 11
(5,065 Views)

Try this.  It takes a time stamp, breaks it into the component parts, adds the components, then turns it back into a time stamp then string.

Message Edited by Ravens Fan on 08-27-2007 10:26 PM

Download All
Message 2 of 11
(5,053 Views)
Thank You!
 
It's work OK!!
0 Kudos
Message 3 of 11
(5,045 Views)

You should note that in the past the cluster did not handle overflow (e.g. 64 seconds) other than in the Day of Month element (see here). I haven't checked this in recent versions.

If you want, you can try this as well.


___________________
Try to take over the world!
Message 4 of 11
(5,021 Views)


@tst wrote:

You should note that in the past the cluster did not handle overflow (e.g. 64 seconds) other than in the Day of Month element (see here). I haven't checked this in recent versions.

If you want, you can try this as well.




That's interesting.  The only thing I looked at for wrap around was for day of the month and it worked fine.  I just tried wrapping around on all of them, and found that the wrap around for months did not work.  It didn't understand anything greater than 12 months (while all the others seemed to apply the roll over appropriately and the time stamp came out fine.)  So it would be necessary in the code that once the clusters are added, to check the number of months to see if it is greater than 12, then and divide by 12.  I think I was able to get something to work using the remainder/quotient function.  I had to decrement the month by 1, do the breakdown, then increment it by 1.  That is because I want my month to be in the range of 1 to 12 (not 0 to 11).  See attached.

Message Edited by Ravens Fan on 08-28-2007 09:41 AM

Download All
Message 5 of 11
(5,006 Views)
I see this as a bug, and I've created a thread for it.

___________________
Try to take over the world!
Message 6 of 11
(4,985 Views)
Hello,
Thank You for your support,
 
I have one more question,
 
I want to create vi only calculate hour, just like the attachment.
 
Does time stamp only calculate in DBL type Numeric Constant with UNIT LABEL  ?
Can I create a numeric Control with unit label to replace the constant??
 
 
Thank you!!
0 Kudos
Message 7 of 11
(4,959 Views)
0 Kudos
Message 8 of 11
(4,955 Views)
0 Kudos
Message 9 of 11
(4,955 Views)
Create a control, right click it and select Visible Items>>Unit Label.

___________________
Try to take over the world!
Message 10 of 11
(4,951 Views)