Examples | NUMTODSINTERVAL Function | Teradata Vantage - Examples - Teradata Vantage - Analytics Database

SQL Data Types and Literals

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-11-06
dita:mapPath
uds1628112204571.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
exs1472253032394
lifecycle
latest
Product Category
Teradata Vantageā„¢

Example: Converting numeric_value into an INTERVAL DAY(100) TO SECOND Value

The following query:

SELECT NUMTODSINTERVAL(100, 'DAY'); 

returns the result '100 00:00:00.000000', which is 100 days.

Example: Converting numeric_value into an INTERVAL DAY(100) TO HOURS Value

The following query:

SELECT NUMTODSINTERVAL(100, 'HOURS'); 

returns the result '4 04:00:00.000000', which is 4 days, 4 hours.

Example: Converting numeric_value into an INTERVAL DAY(100) TO MINUTES Value

The following query:

SELECT NUMTODSINTERVAL(1600, 'MINUTES'); 

returns the result '1 02:40:00.000000', which is 1 day, 2 hours, 40 minutes.

Example: Converting numeric_value into an INTERVAL DAY(100) TO HOURS Value

The following query:

SELECT NUMTODSINTERVAL(3.5, 'HOURS'); 

returns the result 3 hours, 30 minutes.