ComponentOne True DBInput Pro 8.0
Value Property (TDBDate)

 

Value Property (TDBDate)

This property returns or sets the underlying date serial value that is displayed in the control. The default value will be set to the current system date.

Syntax

TDBDate.Value= variant

Read/Write at run time and design time.

Values

100/01/01 - 9999/12/31 (system date is the default)

Remarks

The required date is normally a string expression representing a date from January 1, 100 through December 31, 9999. The date can be any expression that can represent a date without time, in that range.

If date is a string that includes only numbers separated by valid date separators, Value recognizes the order for month, day, and year according to the Short Date format you specified for your system. Value also recognizes unambiguous dates that contain month names, either in long or abbreviated form. For example, in addition to recognizing 12/30/1991 and 12/30/91, Value also recognizes December 30, 1991 and Dec 30, 1991.

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

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

The Value property returns the same serial number as the DateValue function in Visual Basic.

This is the default property of the TDBDate control.

Null value is not a valid date that can be converted to a date, but can be used as a Variant subtype, indicating that a variable or a property contains no valid data.

During input, if the entered data is incomplete such as "1998/__/01" or an invalid data such as "1998/02/31" with the ValidateMode set to 1-Validate or 2- Validate None, both the Value and the Number property will return Null. The Day, Month, Year, and EraYear properties will return a -1 and the EraName property a zero-length string.

The Value property will be automatically set to Null when resetting the maximum or the minimum date range out the current value with the MaxDate and the MinDate properties. Applying a zero length string to the Value property will automatically set the underlying value to Null.

See Also

Text Property (TDBDate)

Format Property (TDBDate)

ValueIsNull Property (TDBDate)

MaxDate Property (TDBDate)

MinDate Property (TDBDate)

 

 


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

Product Support Forum  |  Documentation Feedback