Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Oracle date format question
update table
set new_year_column = substr(old_column,1,4),
new_month_column = substr(old_column,6,2);
commit;
Guang
-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org]On Behalf Of Smith, Ron L.
Sent: Wednesday, April 21, 2004 2:36 PM
To: oracle-l_at_freelists.org
Subject: Oracle date format question
I have a varchar column with data in the format yyyy/mm/dd hh .
I need to pull the year and the month into separate fields so I can
select and group them.
Can anyone tell me the easiest way to do this?
![]() |
![]() |