All Forums Analytics
roy_soumya 3 posts Joined 04/09
16 Apr 2009
Coverting Char to Date

Hi,I am new to Teradata.In oracle if we want to convert char to date, we write like this e.g. to_date('20090417','YYYYMMDD').Could you please tell me how to do that in teradata.Thanks & Regards.Roy

Adeel Chaudhry 773 posts Joined 04/08
17 Apr 2009

Hello,You can do that using CAST and FORMAT clause .... e.g. SELECT CAST('20090417' AS DATE FORMAT 'YYYYMMDD');HTH!Regards,Adeel

-- If you are stuck at something .... consider it an opportunity to think anew.

zlcd1988 1 post Joined 07/12
24 Jul 2012


I am a newer with the teradata fileld .


I find a sql statement wrote : AND lstg.auct_end_dt < date '$AUCT_END_DT'.


Is it mean to convert the value of the parameter $AUCT_END_DT' to date type?



25 Jul 2012

Yes, but you might need to cast the parameter to a proper data format.

You must sign in to leave a comment.