|
|
Archives of the TeradataForum
Message Posted: Mon, 07 Jun 2004 @ 08:34:47 GMT
Subj: | | Re: Formatting string to DATE |
|
From: | | Dieter Noeth |
Hi Vidya,
| I have problem in formatting String type to Date for eg . my input string '06/05/2004' should be format to 'YYYY-MM-DD' ie (2004-06-
05'). | |
You have to specify the format to convert your input string to a date and a second format to convert it back to a string:
Date:
select '06/05/2004' (date, format 'mm/dd/yyyy') (format 'yyyy-mm-dd');
Char(10):
select '06/05/2004' (date, format 'mm/dd/yyyy') (format 'yyyy-mm-dd')
(char(10));
Dieter
| |