|
Archives of the TeradataForumMessage Posted: Thu, 03 Jul 2008 @ 13:11:47 GMT
Hi Venkat, a substraction of 2 dates (or timestamps) do not give a timestamp value but an interval value : select cast('2030-12-31 00:00:00' as timestamp(0)) - cast('2008-06-25 16:23:15' as timestamp(0)) day(4) to second(0) ; the result is : 8223 07:36:45 the problem is that the difference of your 2 dates is too big to be keep in an interval values. You could read teradata documantion ( sql reference, chapter datatype and litteral). maybe you can split your calcultation getting first the interval year, then the interval month and then day to second but i m not sure that you gat the exact calculation Could you explain why you want to do that kind of calculation, maybe we can do the expected result by another way? Regards. Patrick Alves
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||