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.
03-10-2013 01:53 AM
Hello everybody,
I'm working with a device which provide me with GPS time,
as far as I know, it should be time since the beginning of the week...
My question is:
Is there a built in functions to display GPS time in DD HH:MM:SS format or any other format??
Thanks in advance,
Aj
Solved! Go to Solution.
03-10-2013 07:13 AM
What data type is the time in?
If it's a timestamp you can simply use the timestamp to string function.
You should know that GPS time is different than your computer's time - it's currently 16 seconds different. Check this out for more information: http://en.wikipedia.org/wiki/Global_Positioning_System#Timekeeping
03-10-2013 07:22 AM
Chris,
thanks for the quick response...
in matter of fact, the data I recieve is string which I'm gonna translate to int (or what ever fit), unless there is a type of variable which I can use to ease the work 🙂
is there a way to convert this INT to timestamp?
thanks,
aj
03-10-2013 04:44 PM
If you actually want a timestamp, you can use a combination of the Seconds to Date/Time and Date/Time to Seconds VIs - you can get the current timestamp, use the Seconds to Date/Time function to pull out the components (day, hour, minute, etc.), replace those with the values you get from your reading, and then bundle it back into a timestamp with the Date/Time to Seconds VI.
03-10-2013 05:23 PM
Well, coming to CVI world ( ) you can take a look at CVITime functions from the Utility Library: if your instrument returns a string representation of time, you can use extract individual components from the string and pass them to CVIAbsoluteTimeFromLocalCalendar () function that returns time in National Instruments Binary Time Format.
Alternatively you can use Windows SYSTEMTIME format and associated functions.
You can finally use MakeDateTime () to obtain a double representation of date and time.
03-10-2013 05:33 PM
Darn it! I keep forgetting to check which forum I'm on . . .
Oh well, same idea I guess. . .