|
|
Archives of the TeradataForum
Message Posted: Thu, 07 Sep 2006 @ 19:11:28 GMT
Subj: | | Re: How to FORMAT date |
|
From: | | Anomy Anom |
<-- Anonymously Posted: Thursday, September 07, 2006 15:09 -->
SELECT extract(year
FROM column_name)||
CASE
WHEN TRIM(extract(month
FROM column_name)) <10 THEN '0'||TRIM(extract(month
FROM column_name))
ELSE TRIM(extract(month
FROM column_name))
END
||
CASE
WHEN TRIM(extract(day
FROM column_name)) <10 THEN '0'||TRIM(extract(day
FROM column_name))
END AS new_date
FROM table_name
| |