LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

computer time

I would like the ability to set the current date and time programatically, without having to restart or anything strange like that. I've serached the forum, and found several copies of a vi call "Set_Time.vi", but unfortunately it is saved in 7.0, and i'm using 6.1.
 
any thoughts?
0 Kudos
Message 1 of 7
(3,264 Views)

If you are feeling brave you can try the using the Win32 function SetSystemTime in the kernel32.dll

However, an easier way would be to use the System Exec VI with time parameter





Message Edited by nrp on 04-05-2007 04:03 PM

Message 2 of 7
(3,246 Views)
excelent! thank you very much!
0 Kudos
Message 3 of 7
(3,235 Views)

BobChuck wrote:
I would like the ability to set the current date and time programatically, ... but unfortunately it is saved in 7.0, and i'm using 6.1.
 
any thoughts?

Alternatively, there is a v6.0 VI by Jim Kring here .
=====================================================
Fading out. " ... J. Arthur Rank on gong."
Message 4 of 7
(3,227 Views)
Ah, I tried to do something similar to Jims, but it kept on crashing my LV.

Now I know why, I had the calling convention set to C instead of stdcall! Smiley Tongue

Glad its working now...

Message 5 of 7
(3,215 Views)
Thank you, but the previous method is simpler but still meets my needs.
0 Kudos
Message 6 of 7
(3,215 Views)
well, if you like my answer then some stars would make a nice early Easter present Smiley Wink
Message 7 of 7
(3,211 Views)