MakeTime
Syntax
MakeTime(hour_value | minute_value | second_value | rollover_boolean)
Description
This function returns a time value based on the hour, minute, and second values passed to the function as parameters.
Parameters
| Parameter | Description |
|---|---|
|
hour_value |
A number representing the hour, such as the value returned by the Hour() function. |
|
minute_value |
A number representing the minute, such as the value returned by the Minute() function. |
|
second_value |
A number representing the second, such as the value returned by the Second() function. |
|
rollover_boolean |
(Optional) Rolls over the hour to 0 when hour_value reaches 24. True - Returns (hour_value – 24) when hour_value is greater than 24. False - Returns hour_value even when hour_value is greater than 24. The default value is True. |
Returns
Returns a time value.
Example
The following table presents examples of using the MakeTime function:
| Expression | Result |
|---|---|
|
MakeTime(Add(Hour(Time())|12)|Add(Minute(Time())|-30)|Second(Time())) |
7:00:00 AM |
|
MakeTime(23|Add(60|30)|0|False) |
24:30:00 |
|
MakeTime(23|Add(60|30)|0|True) |
00:30:00 |
|
MakeTime(23|Add(60|-30)|0) |
23:30:00 |