|
|
Archives of the TeradataForum
Message Posted: Tue, 07 Jul 2009 @ 10:47:38 GMT
Subj: | | Re: 7453: interval field overflow. |
|
From: | | Sapra, Kapil Dev |
Hi,
As difference is big so you have to use DAY or HOUR(4) to find the correct result.
Using HOUR(4)
---------------
SEL
CAST(CURRENT_DATE AS TIMESTAMP(2)) -
CAST('2009-07-01 00:00:00.00' AS TIMESTAMP(2)
FORMAT 'YYYY/MM/DDBHH:MI:SS.S(2)') HOUR(4) TO SECOND(6)
Using DAY(4)
---------------
SEL
CAST(CURRENT_DATE AS TIMESTAMP(2)) -
CAST('2009-07-01 00:00:00.00' AS TIMESTAMP(2)
FORMAT 'YYYY/MM/DDBHH:MI:SS.S(2)') DAY(4) TO SECOND(6)
Best Regards,
Kapil D Sapra
| |