meta data for this page
F_PERIOD2SECONDS
function from adhoc
Entrypoint period2seconds compatible with UTF-8
Inputs/Outputs
Input CSTRING(254) period in pattern [d]:h:m:s Output INTEGER period in seconds
Syntax
Periods could be enter with 2- or 1digits interval (dd:hh:mm:ss or d:h:m:s). Negative periods starts with a "-" in front. Periods with pattern days:hours:minutes:seconds (4 intervalls) or hours:minutes:seconds (3 intervalls) are allowed. The output of periods with less than 3 intervalls or containing other characters is <null> or empty string. For input also f.e. '0:26:0:0' instead of '1:2:0:0' alllowed for 26 hours. TestSQL SELECT 4205 AS ISCORRECT, F_PERIOD2SECONDS('0:1:10:5') FROM RDB$DATABASE; SELECT NULL AS ISCORRECT, F_PERIOD2SECONDS(NULL) FROM RDB$DATABASE;