Overview
The example shows a way to write/read a time stamp to a text file.
Description
The following example is a good way to write/read a time stamp to a text file. Please note that the milliseconds component of the timestamp is lost in this process. Most DAQ File I/O operations will have this functionality built in but if a program developer wanted to integrate it on a lower level, this would be one way to do it.
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.
Bug:
Times of 12:xx PM or 12:xx AM give wrong output
Examples:
Input:
12:20:09.848 PM
8/21/2014
Output:
12:20:09.000 AM
8/22/2014
note that PM became AM and we're now in the next day.
OR
Input:
12:20:09.848 AM
8/21/2014
Output:
12:20:09.000 PM
8/21/2014
note that AM became PM