Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SELECT YEAR FROM DATE FROM VARCHAR2

79690Mar 27 2003 — edited Mar 27 2003
Dear all,
i have a question aboute date and TO_DATE. The thing is i have a VARCHAR2 colum with data like:
12/09/1979
02/05/1978 etc etc etc

Now we like to know how old the person is at the beginning of the year. So we have to take the current year -1 -year of burth.

The first part is not so hard. We can take the current year from DUAL. Now here is the hard part how do we convert the varchar data to a date and extract only the years from it and not the rest of the date?

All bright and smart things are welcome :-)
Thanks already.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 24 2003
Added on Mar 27 2003
6 comments
1,498 views