ComponentOne True DBInput Pro 8.0
Text Property (TDBTime)

 

Text Property (TDBTime)

Returns the underlying time value in text format, including any literals.

Syntax

TDBTime.Text= string

Read/Write at run time and design time.

Remarks

The Text property returns a formatted text string based on the Format property, and is dependent to the Hour12Mode property, which determines the 12-hour mode. For example:

TDBTime.Format = "hh:nn:ss AM/PM"

TDBTime.Value = "13:00:00"

In the example above, the Text property returns "1:00:00 PM". If the Value property equals Null, the Text property will return a string including all literals and the prompt character. For example: "__:__:__ __".

TDBTime.Format = "hh:nn:ss AM/PM"

TDBTime.Value = "00:00:00"

TDBTime.Hour12Mode = dbiHour0As12

In the example above, the Text returns "12:00:00 AM".

TDBTime.Format = "hh:nn:ss AM/PM"

TDBTime.Value = "12:00:00"

TDBTime.Hour12Mode = dbiHour12As0

In the example above, the Text property returns "00:00:00 PM".

When modifying time values by changing the Value, Number or the Text properties, which are not within the proper range, you will cause an invalid value range error to occur without any events firing. If an invalid value is set into these properties, an invalid value error will occur.

When the Text property is changed, the changes will also be reflected in the Value, Number property.

The Text property differs with the DisplayText property. The Text property returns a formatted string based on the Format property while the DisplayText returns a formatted string based on the DisplayFormat property.

If both the format set to the Format and the DisplayFormat property equals, the return text of the Text and the DisplayText will be the same. But with an exception when the ShowLiterals property is set to either 1-Post Display or 2-Pre Display, the Text property may not return a string according to the input mask.

Applying a zero length string to the Text property will automatically set the underlying value to Null and rebuild a string using the prompt character with all literals defined in the input mask for the Text property.

See Also

Value Property (TDBTime)

Number Property (TDBTime)

Format Property (TDBTime)

DisplayFormat Property (TDBTime)

DisplayText Property (TDBTime)

Hour12Mode Property (TDBTime)

ShowLiterals Property (TDBTime)

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback