To download NI software, including the products shown below, visit ni.com/downloads.
This example transforms the input date and time to ISO 8601 Standard
This example creates an ISO-8601 compliant date/time string using various LabVIEW format specifiers. If no timestamp is provided, the current time is used.
LabVIEW Full Development System 2012 or compatible
Steps to Implement or Execute Code
Additional Information or References
Wikipedia entry for ISO-8601
VI Block Diagram
SubVI Connector Pane
**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.
there's a bug in your VI related to how LabVIEW numbers weeks of year. The LabVIEW numbering scheme uses US-american standard which is different to ISO8601! You can test that with a date like Jan 3rd 2010 (as noted in the linked Wikipedia entry, section "Week dates")...
Wow! Thanks for catching that. I'm gonna try to fix that up, but it seems I have to do more of the work that LV should have done for me
go here: http://forums.ni.com/t5/LabVIEW/Date-time-conventions/m-p/172136#M101086 to find a correctly working ISO-Week VI!
GerdW, I used the example you referenced. I changed the design of my VI to use a state machine, and had to add some logic to the referenced VI to update the year.
Lesson learned: LabVIEW 'to UTC' ≠ ISO-8601 compliant
The VI I created offers many variants of an 8601 string, but you can use the following format string with "Format into String" and "Scan from String" to persist an 8601 UTC timestamp.