ComponentOne True DBInput Pro 8.0
Value Property (TDBTime)

 

Value Property (TDBTime)

This property returns or sets the underlying time serial value which displays in the control.

Syntax

TDBTime.Value= variant

Read/Write at run time and design time.

Values

00:00:00 - 23:59:59 (system time is the default)

Remarks

The default value will be set to the current system time.

The required time is normally a string expression representing a time from 00:00:00 to 23:59:59.

If time is a string that includes only numbers separated by valid time separators, Value recognizes the order for hour, minute and second according to the default format (hh:nn:ss) you specified for your system. Value also recognizes A.M and P.M information. For example, in addition to recognizing 9:00:00 and 15:00:00, Value also recognizes 9:00:00 AM and 3: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 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 TimeValue function in Visual Basic.

This is the default property of the TDBTime control.

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

If the entered data is incomplete suring input, such as 13:__:30 or an invalid data such as 99:99:99 AM, with the ValidateMode set to 1-Validate None, the Value and the Number property will both return Null. The Hour, Minute, Second properties will return -1 and the AMPM property a zero-length string.

The underlying value will be automatically set to Null when resetting the maximum or the minimum time range out of the current value with the MaxTime and the MinTime properties. For example:

TDBTime.Value = "6:00:00"

TDBTime.MinTime = "12:00:00"

TDBTime.MaxTime = "23:00:00"

Applying a zero length string to the Value property will automatically set the underlying value to Null.

See Also

Text Property (TDBTime)

Format Property (TDBTime)

ValueIsNull Property (TDBTime)

MaxTime Property (TDBTime)

MinTime Property (TDBTime)

 

 


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

Product Support Forum  |  Documentation Feedback