From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
07-01-2014 09:51 AM
Hi,
Im making a clock with an alarm, and i want to be able to set the date that the alarm will go off, however to do this i need to be able to convert the difference between the current date and the target date into seconds in order to be able to use it in the elapsed time vi. Does anyone know how to do this? Or is there a better way to achieve this?
Thanks
Solved! Go to Solution.
07-01-2014 09:57 AM
07-01-2014 10:00 AM
Why do you need to use the Elsapsed Time function? Just compare the current date/time to the alarm date/time. Doing it this way will also allow you to save the alarm date/time to a file and you can shut down your program and come back to it.
07-01-2014 10:04 AM
How to i get a time stamp to automajically set itself to always be the current time?
07-01-2014 10:05 AM - edited 07-01-2014 10:06 AM
07-01-2014 10:06 AM
Well i want it to have like the autoreset and stuff, that way i might try afterwards though, still getting used to it:)
07-01-2014 10:15 AM
@nickom wrote:
How to i get a time stamp to automajically set itself to always be the current time?
I'm not sure if this is what you're looking for, but have you tried the "Get Date/Time In Seconds" VI? I don't know how you're updating your clock, or at what frequency you require it to be updated, but if the update frequency you need isn't too high (say, <500 Hz) I don't see why putting the "Get Date/Time In Seconds" VI inside your update loop wouldn't work.