Academic Company Events Community Support Solutions Products & Services Contact NI MyNI
28 ratings:
 3.92 out of 5   

How do I Convert a Date/Time String into a Timestamp Constant in LabVIEW?

Primary Software: LabVIEW Development Systems>>LabVIEW Professional Development System
Primary Software Version: 8.0
Primary Software Fixed Version: N/A
Secondary Software: LabVIEW Development Systems>>LabVIEW Full Development System

I have a Date/Time string in LabVIEW and I want to convert it into a Timestamp constant. How do I do this?

To convert the Date/Time string into a Timestamp constant you need to extract all of the integer values separately by following these steps:
  1. Separate the string into individual numbers.
  2. Convert the numbers to integers.
  3. Bundle the integers into a cluster.
  4. Convert the cluster to a Timestamp constant using the Date/Time To Seconds function under Time and Dialog palette.
For further clarification, please see the attached LabVIEW example code. The LabVIEW VI illustrates how to convert a Date/Time string into a Timestamp Constant. In order to use this method, the string must be formatted correctly.

Related Links:
Developer Zone Tutorial: LabVIEW Timestamp
NI Community: Convert String to Timestamp
NI Community: String to Timestamp


Report Date: 09/20/2005
Last Updated: 07/30/2014
Document ID: 3PJC3B8

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit