Converting a character value to date format

Database
Enthusiast

Converting a character value to date format

Hi all,
I have a table having distinct column values as of these mentioned below and the column was defined as varchar. i want to convert all these values into proper date format yyyy/mm/dd or in a format yyyy-mm-dd .is there any query to do this?.also pls note that.if values which cannot be changed into yyyy/mm/dd or yyyy-mm-dd format,it has to be replaced by null.in the below mentioned values which values can be changed to yyyy/mm/dd or yyyy-mm-dd format?.If so why?.pls suggest

clmn1
---------------
?
¥ÞÈZ6PËGMÜJôó©X?éq
"#$%&'()*+,-./012345
"#$%&'()*ýýýýýýýýýýý
--
0000-00-00
0029-36-91
0030-37-11
0030-40-33
01/20/2007
0125-06-20
0136-38-96

Regard,
Young chap
1 REPLY
Teradata Employee

Re: Converting a character value to date format

Hello,

Your best option will be a UDF.

From the values provided, only "01/20/2007" can be changed to date (any allowed format you like), rest are not valid date values.

Regards,

Adeel