ComponentOne True DBInput Pro 8.0
Text Property (TDBDate)

 

Text Property (TDBDate)

The Text property allows you to return or set an exact matching date in text format, including all literals specified with the Format property.

Syntax

TDBDate.Text= string

Read/Write at run time and design time.

Remarks

With this code, the Value property will return a VB Date: 1998/03/11.

TDBDate.Format = "g. ee / mm / dd"

TDBDate.Text = "H. 10 / 03 / 16"

If the Value property equals Null, the Text property will return a string including all literals and the prompt character. For example:  "__ / __ / ____ ".

Modifying date values by changing the Value, Number or the Text property, which are not within the proper range, 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 properties.

The Text property is recommended for use with the yyyy rather than the yy format. This is to avoid the year 2000 (Y2K) compliance problem.

The Text property differs from 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 formats set to the Format and the DisplayFormat property are equal, the return text of the Text and the DisplayText will be the same. However, there is 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 (TDBDate)

Number Property (TDBDate)

Format Property (TDBDate)

DisplayFormat Property (TDBDate)

DisplayText Property (TDBDate)

ShowLiterals Property (TDBDate)

 

 


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

Product Support Forum  |  Documentation Feedback