Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 3rd, 2004, 10:09 PM
mimi.marisa mimi.marisa is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 1 mimi.marisa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy update year in date field

please help me on this.. I wanted to update year in the date field which is currently in this format "DD-MON-YY". But actually the year suppose to be "1986" turn out to be "2086"
How can I change the year from "20" to "19"

I've tried run this SQL but it change all the date and month

update CUSTOMERS set DATE_OF_BIRTH=DATE_OF_BIRTH - 100 * 365;

it just didn't work the way I want it to..

PLEASE HELP!!

Reply With Quote
  #2  
Old March 4th, 2004, 07:44 AM
Dan Drillich Dan Drillich is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 68 Dan Drillich User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
In Oracle 9i you can do:

select sysdate - to_yminterval('100-00') from dual;

Regards,
Dan

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > update year in date field


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT