I am trying to convert the datatype of a column Confirmation_Date
to date type but unable to to do so, the Column is of varchar type and SER_MUHAMMAD_MALLICK.user is the tablel. Iam using the following code snippet.
SELECT CONVERT (datetime, Confirmation_Date , 104) FROM USER_MUHAMMAD_MALLICK.user_upsells;
I am receiving the following error message when I run this code
SQL Error [42000]: syntax error, unexpected IDENTIFIER_LIST_ [line 1, column 17] (Session: 1729360210797461536)
You can use alter table modify column. For example to convert a
VARCHAR
column toDATE
:Note that the varchar values must be of the correct date format. If you have a different date format you need to specify the
NLS_DATE_FORMAT
session parameter with ALTER SESSION: