Virus scan in progress. Please wait to download attachments.
This example converts a string in HH:MM:SS+UTC HH:MM format into a Time Stamp and outputs the difference with the current time in seconds.
The string is converted into a Time Stamp by using the Scan from String function. A format string specific to Time Stamps is used to make sure the string is properly converted into a Time Stamp. This format string can be found in the LabVIEW Help File for Scan from String. The date portion of the time stamp is extracted from the Get Date/Time in Seconds function.
LabVIEW 2012 (or compatible)
Steps to Implement or Execute Code:
Download the attcahed Zip folder.
Open the "String to TimeStamp Conversion.vi"
Enter the Time in the String Control in the format HH:MM:SS+HH:MM or HH:MM:SS-HH:MM to specify the time zone difference referenced to UTC in hours and minutes where the UTC time in HH:MM format is after the sign
Run the VI
Additional Information or References:
**This document has been updated to meet the current required format for the NI Code Exchange.**
Will CLA, CLED, CTD, CPI LabVIEW Champion Choose Movement Consulting choose-mc.com
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.