Reference > TDBTime Control > TDBTime Control Properties > Number Property (TDBTime) |
Number Property (TDBTime)
This property allows you to set the date or time value in a long integer format; yyyymmdd (date) or hhnnss (time).
control.Number= variant
Read/Write at run time and design time.
The default will be the current system date or time. You can set 0 or NULL to clear the control (underlying value). The following examples describe how the Number property will be processed when the year keywords y or yy is used.
TDBDate.Format = "yy/mm/dd"
TDBDate.MinDate = "1900/01/01"
TDBDate.MaxDate = "2100/12/31"
TDBDate.Value = Null
In the above example, if the user enters 300101, this property will return a date with the century added to it yielding 19300101.
When the user enters a value 290101, this property will add the current century to the date yielding 20290101. However, since this value exceeds the maximum date, the InvalidRange event will be fired when moving the focus away from the control.
When modifying date values by changing the Value, Number or the Text property, which are not within the proper range, this 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 Number property is changed, the changes will also be reflected in the Text, Value property.
The Number will return a Null when applying a 0 and also when the Value property is set to Null.
See Also