NovaStar Database Reference / Functions / interval_from_seconds
Overview
The interval_from_seconds
function takes an integer number of seconds, and returns an interval in the format HH:MM:SS
.
It is defined in the interval.sql
file distributed with the NovaStar installer.
Function Usage
The function syntax is as follows.
interval_from_seconds(
IN timeintervalnumber integer)
The function returns an interval object.
Function parameters are as follows.
Function Parameters
Parameter | Description |
---|---|
timeintervalnumber |
Number of seconds to turn into an interval. |
The following creates an interval for 90 seconds, or 1 minute 30 seconds, which is an output format of 00:01:30
.
select * from interval_from_seconds(90);
Troubleshooting
See Also
interval_to_seconds
- Function that does the opposite.