formatting date

UDA
N/A

formatting date

can anyone please tell me why the folloing query is not working.
i result same format is comming.

sel '2004-01-01'(format 'yydd');
2 REPLIES

Re: formatting date

sel cast((current_date (format 'yydd')) as char(4))

Re: formatting date



With the syntax you have, Teradata is seeing '2004-01-01' as a char field. You'll need to make sure that Teradata sees it as a date first, then change it's format.

select ('2004-01-01' (date)) (format'yydd')

should work.