|
|
Archives of the TeradataForum
Message Posted: Tue, 08 Feb 2011 @ 13:39:55 GMT
Subj: | | Re: Converting TIMESTAMP to DATE |
|
From: | | Sarvesh Tewari |
Hi John,
You can try this
sel CAST((EXTRACT (YEAR FROM CURRENT_TIMESTAMP(0)))||TRIM((EXTRACT (MONTH FROM
CURRENT_TIMESTAMP(0))) (format '99'))||TRIM((EXTRACT (DAY FROM CURRENT_TIMESTAMP(0)))
(format '99')) AS DATE FORMAT 'yyyy mmdd' );
*** Query completed. One row found. One column returned.
*** Total elapsed time was 1 second.
((EXTRACT(YEAR FROM Current TimeStamp(0))||Trim(BOTH FROM EX
------------------------------------------------------------
20110208
Here instead of CURRENT_TIMESTAMP(0) you can use your variable
Thanks,
Sarvesh Tewari
| |