Re: CONVERT and DATEDIFF in Teradata

Hi,

I guess, DATEDIFF functionality can be performed using INTERVAL functions as below,

Field1 - Field2 SECOND(N)

Field1, Field2 - columns defined with datatype as TIMESTAMP or TIME,N - 1 to 4, number of digits needed for the output, n=3 will give you difference upto 999 seconds, difference above that will throw error.Similarly we can use MINUTE(N) and HOUR(N) for time difference.

If the columns are defined with datatype as DATE or TIMESTAMP, then we can use YEAR(N), MONTH(N) and DAY(N)