Sundeep, I think you have a couple of paths to do this. One is to add a new column to the table and convert the content of abcd to a DB2 date format and update your new column. When complete you can rename the abcd to abcd_old and rename your new column to be abcd.
Option 2 may be to unload the table in such a way that you construct your new date format as you unload the table, have the DBAs re-create the table with abcd changing from a string to a DATE type column then you can load the table from you unloaded data. One thing you MUST ensure no matter which option you choose is that if you change this column that every application that uses it can handle the new format. If you can't control that it might be in your best interest to add a column to this table that is a date type column and then run a process to convert abcd into your new abcd_date column and leave both on this table. I hope this helps in some way and welcome to the world of DB2.
------------------------------
Robin Sulsona
------------------------------
Original Message:
Sent: Fri December 20, 2019 12:09 AM
From: sundeep kotaru
Subject: Date query
Hi Team,
I have a DB2 view and in which one field datatype is string (format: yyyymmdd) and I want to change it to date data type.
Assume field name is abcd. I researched some posts on web, but dint get answer.
please help as I m beginner to DB2
Regards
Sundeep
------------------------------
sundeep kotaru
------------------------------
#Db2