NovaStar Database Reference / Functions / interval_as_text
Overview
The interval_as_text
function takes an an interval in the format HH:MM:SS
and returns a string in the format X year(s) X month(s) X day(s) X hour(s) X minute(s) X second(s)
.
It is defined in the interval.sql
file distributed with the NovaStar installer.
Function Usage
The function syntax is as follows.
interval_as_text(
IN interval_req interval)
The function returns a string.
Function parameters are as follows.
Function Parameters
Parameter | Description |
---|---|
interval |
An interval in the form HH:MM:SS to get a textual representation of. |
The following returns the string 2 hours 10 minutes 1 second
.
select * from interval_of_text('02:10:01');