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

Hi,

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?

 

Thanks

Qaisar Kiani 337 posts Joined 11/05
25 Jul 2012

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

kamKAM 1 post Joined 07/16
1 month ago

BONJOUR

SVP, DE L'AIDE 

JE CHERECHE COMMENT UN CHAMP SI TOUT SES CARACTeRS  SE TROUVENT DANS UNE LISTE DE VALEURS!

PAR EXEMPLE: LA LISTE DE VALEUR EST '0987654321'

'12D5664'  NE SOIT PAS SELECTIONNE PARCEQUE IL A LE CARACTERE 'D'

'1275664'  SERA SELECTIONNE PARCEQUE TOUT CES CARATERES SONT DANS LISTE 

MERCI D'AVACE :)

M.Saeed Khurram 544 posts Joined 09/12
1 month ago

Bonjour,
Ceci est déjà répondu à
https://forums.teradata.com/forum/enterprise/to-check-is-a-string-is-numeric-or-not
Khurram
 

Khurram

zakyw 11 posts Joined 07/16
1 month ago

hi roy_soumya
ya , i agree with the others , you can used function CAST for the convert char to date 
 
 

You must sign in to leave a comment.