How Do I Format a Number into a Relative Time String?
Primary Software Version: 7.0
Primary Software Fixed Version: 8.0
Secondary Software: N/A
I know I can change the format of a numeric control to relative time (Right-click the control and select Format & Precision»Relative Time). However, I would like to format a numeric data value into a relative time string. Can I do this using the Format Into String or Format Date/Time String functions?
In LabVIEW 7.1 and before, the Format Into String and Format Date/Time String functions do not support relative time format. However, the behavior may still be achieved using the attached VI. It shows how data may be formatted into a relative time string using a numeric control. This method uses the numeric control's properties to get the numeric text, and requires the front panel containing the numeric control to be loaded.
In LabVIEW version 8.0 and higher you can use the Format Into String function to specify relative time format. The code
LabVIEW 2012 Help: Format Codes for the Time Format String
LabVIEW 2012 Help: Edit Format String Dialog Box
KnowledgeBase 26D9ECB5: Including Certain Characters in a Format String
KnowledgeBase 38BGK8DW: How Do I Display Relative Time in LabVIEW 7.0 in the Same Format as in LabVIEW 6.1 and Earlier?
Format String To Time.vi
Report Date: 11/04/2003
Last Updated: 08/30/2013
Document ID: 3339T6QT