Bookshelf Home | Contents | Index | Search | PDF |
Siebel VB Language Reference > Siebel VB Language Reference >
TimeSerial Function
This standard VB function returns a time as a variant of type 7 (date/time) for a specific hour, minute, and second.
Syntax
TimeSerial(hour, minute, second)
Returns
A time as a specific hour, minute, and second.
Usage
You also can specify relative times for each argument by using a numeric expression representing the number of hours, minutes, or seconds before or after a certain time.
Example
This example displays the current time using TimeSerial.
Sub Button_Click
Dim y As Variant
Dim msgtext As String
Dim nowhr As Integer
Dim nowmin As Integer
Dim nowsec As Integer
nowhr = Hour(Now)
nowmin = Minute(Now)
nowsec = Second(Now)
y = TimeSerial(nowhr,nowmin,nowsec)
msgtext = "The time is: " & y
End SubSee Also
DateSerial Function
DateValue Function
Hour Function
Minute Function
Now Function
Second Function
TimeValue Function
Bookshelf Home | Contents | Index | Search | PDF |
Siebel VB Language Reference Published: 18 June 2003 |