Changing date Format

Database

Changing date Format



Hello Friends,

Can u help solve this?

Question is

Add another column to the same table as 'date_2' with data type DATE and update this column with date_1 column
you need to change date_1 9/21/2005 to 2005-09-21 and populate in date_2

Thanks

2 REPLIES

Re: Changing date Format



Thanks Durrani, i will try based on what u said.
N/A

Re: Changing date Format

Kavya,
You could alter table to add date_2 format 'YYYY-MM-DD', then update this with column date_1 data.

If you really only need one date column in the end,just alter the existing columns format -- alter table add date_1 format'YYYY-MM-DD'

Bob