Home > Language Reference > Classes > Selector

Time Property

Time displayed by the control.

Syntax

Public Property Get Time() As Long
Public Property Let Time(ByVal
llTime As Long)

ParameterDescription
lTimeTime to set

Remarks

The value contained by the property Time corresponds to the number of seconds elapsed since midnight.

If the selector is not of type Time or if no selection has been made, this property is set to 0.

The display format of the time can be changed using the Format property.

In the following example, the value of the selector is initialised with the current time.

Private Sub Form_Load()
  selector1.Format="hh:nn:ss"
  selector1.Time=Hour(Date())*CLng(3600)+Minute(Date())*60+Second(Date())
End Sub

The number of seconds elapsed since midnight can be determined by using the DatePart function as shown below:

Private Sub Form_Load()
  selector1.Format="hh:nn:ss"
  selector1.Time=DatePart("ss",Date)
End Sub

The dialog box of a Time Selector :

System requirements

SystemMinimal versionRemarks
Palm OSPalm OS 3.0N/A