MAKE_DT_INTERVAL
The MAKE_DT_INTERVAL
function is used to construct a time interval value of type interval day to time
. This function accepts four optional parameters: days, hours, minutes, and seconds. The seconds parameter supports decimals with millisecond precision.
Function
days
: int type, represents the number of days.hours
: int type, represents the number of hours.mins
: int type, represents the number of minutes.secs
: decimal type, represents the number of seconds, supports decimals, precision up to milliseconds.
Return Result
The function returns a value of type interval day to time
.
Example
Example 1: Create a time interval of 1 day, 2 hours, 3 minutes, and 4 seconds.
Example 2: Create a time interval that only includes seconds (e.g., 1 minute 20 seconds).
Example 3: Create a time interval that only includes days (e.g., 5 days).
Example 4: Create a time interval that includes days, hours, and seconds (e.g., 3 days, 10 hours, 30 seconds).