The Oracle function TO_CHAT accept DATE datatype. In DB2, i know that exist the VARCHAR_FORMAT function (synonym TO_CHAR), but this function only accepts TIMESTAMP datatypes.
How can i have the same result in DB2, like this SQL in Oracle:
SELECT to_char(data_en trada,'YYYYMM') FROM t1
Obs: data_entrada is of datatype DATE.
Thanks,
Wellerson
How can i have the same result in DB2, like this SQL in Oracle:
SELECT to_char(data_en trada,'YYYYMM') FROM t1
Obs: data_entrada is of datatype DATE.
Thanks,
Wellerson
Comment