Syntax 3: For integers
Description
Combines integers representing hours, minutes, seconds, and
microseconds into a time value.
Syntax
|
1 |
Time ( hour, minute, second {, microsecond } ) |
|
Argument |
Description |
|---|---|
|
hour |
The integer for the hour (00 to 23) of the time |
|
minute |
The integer for the minutes (00 to 59) of the |
|
second |
The integer for the seconds (0 to 59) of the time |
|
microsecond (optional) |
The integer for the microseconds (0 to 32767) of the |
Return value
Time.
Returns the time as a time datatype and 00:00:00 if the value in
any argument is not valid (out of the specified range of values). If any
argument is null, Time returns null.
Examples
These statements set What_Time to a time value with microseconds,
and display the resulting time as a string in st_1. The default display
format does not include microseconds, so the String function specifies a
display format with microseconds. Leading zeros are appended to the
string value for microseconds:
|
1 2 3 |
Time What_Time What_Time = Time(10, 15, 45, 234) st_1.Text = String(What_Time, "hh:mm:ss.ffffff") |
The time in the string variable is set to 10:15:45.000234.
These statements set What_Time to 10:15:45:
|
1 2 |
Time What_Time What_Time = Time(10, 15, 45) |
See also
Time method for DataWindows in the section called “Time” in DataWindow Reference.