Syntax 3 For integers
Description
Combines integers representing hours, minutes, seconds, and
microseconds into a time value.
Syntax
1 |
<span>Time</span> ( <span>hour</span>, <span>minute</span>, <span>second</span> {, <span>microsecond</span> } ) |
Argument |
Description |
---|---|
hour |
The integer for the hour (00 to 23) of |
minute |
The integer for the minutes (00 to 59) |
second |
The integer for the seconds (0 to 59) |
microsecond (optional) |
The integer for the microseconds (0 to |
Return Values
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 |
Time What_Time |
1 |
What_Time = <span>Time</span>(10, 15, 45, 234) |
1 |
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 |
Time What_Time |
1 |
What_Time = <span>Time</span>(10, 15, 45) |
See Also
-
Time method
for DataWindows in the DataWindow Reference or online Help