Overview
This examples shows how to get milliseconds or microseconds from a timestamp.
Description
This examples shows how to get milliseconds or microseconds from a timestamp. The timestamp can be decoded to provide fractional seconds. The resulting fraction seconds can then be converted to milliseconds or microseconds in a double format. The Timestamp to Milliseconds VI attached has the following terminals on it's connector pane:
Inputs:
Timestamp In (Timestamp) * Required Input
Milliseconds (T, Default) or Microseconds (F)
Outputs:
Time String (String)
Hours (Double)
Minutes (Double)
Seconds(Double)
Requirements
Steps to Implement or Execute Code
Additional Information or References
VI Snippet
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
This doesn't show the value of Seconds, just Hour, Minute, and Fractional Seconds. You need to add %S to the format string. Is there any benefit to using this VI instead of Seconds to Date/Time from the timing palette or Format Date/Time String with %H:%M:%S%8u?