Archives of the TeradataForum
Message Posted: Thu, 17 Jun 2004 @ 22:43:52 GMT
SELECT CAST( CAST( (T2 - T1 DAY(4) TO SECOND) / 86400 AS INTERVAL SECOND(4,6) ) AS DECIMAL(10,6) ) * 1440
T2 and T1 are your timestamps. 86400 is the number of seconds in a day. 1440 is the number of minutes in a day. The answer datatype is DECIMAL(15,6). You can choose to round or truncate the fractional minute component.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 23 Jun 2019|