FormatString Property

Measurement Studio User Interface

FormatString Property

Syntax

CWNumEdit.FormatString

Data Type

String

Purpose

Specifies the string that formats the value in the numeric edit control.

Remarks

The format string controls how the value of the CWNumEdit control is displayed. For example, you can use a format string to specify digits of precision, use exponential notation, or display time or date values.

Refer to CWAxis.FormatString for complete documentation of the FormatString property.

Example

'Make the CWNumEdit control display up to 3 digits to the right of the decimal
CWNumEdit1.FormatString = ".###"

'Use date formatting and set the value
CWNumEdit1.FormatString = "mm/dd/yyyy"
CWNumEdit1.Value = "1/8/1973"

'Use time formatting and set the value
CWNumEdit1.FormatString = "hh:nn:ss"
CWNumEdit1.Value = "10:30 pm"

See Also

CWAxis.FormatString

Text