Reinier,
Date of births prior to 1950 restricts us (I would think everyone else using dates of birth as well) from using the 'rr' format. I had tried that first before hardcoding the '19' onto the date itself.
Other developers not using dates prior to 1950 shouldnt have to do this. The problem I found with using the 'yyyy' was that the year has to be in 4 digit format in the first place(which ours isnt, when the data is being punched into files). I think everyone has to assess what range of dates they're going to be using and use what format best suits them.
As you suggested though, the 'rr' format should fix the original query.
regards,
Chad.
-----Original Message-----
From: Reinier de Ruiter [mailto:Reinier.deRuiter@APOLLOGRP.EDU]
Sent: Wednesday, January 05, 2000 2:34 PM
To: SQR-USERS@LIST.IEX.NET
Subject: Re: Strange Problem
Haven't done your y2k testing have you ? :-))
Anyways, we had a similar situation. It turns out the nls-date format is set
to dd-mon-yy and Oracle automatically adds the current century to it (2000)
and that's why you get 2099 instead of 1999. Change your nls-date format to
dd-mon-yyyy which will probably give you problems elsewhere in the code. In
your situation I would use the dd-mon-rr in your edit-mask. The rr will
cause Oracle to convert 99 into 1999. (50-99 will be converted into
1950-1999 and 00-49 will be converted into 2000-2049)
good luck,
Reinier de Ruiter
Peoplesoft Programmer/Analyst
Apollo Group, University of Phoenix
Phoenix, Arizona
tel:480-557-1158
email: reinier.deruiter@apollogrp.edu
-----Original Message-----
From: srinivasan.seetharaman@DB.COM
[mailto:srinivasan.seetharaman@DB.COM]
Sent: Wednesday, January 05, 2000 1:53 AM
To: SQR-USERS@list.iex.net
Subject: Strange Problem
Hello All,
I have a strange problem. I have a SQL statement in SQR. I select a
date
from a table .Take for instance the date is c_dt, the database variable is
referenced as &c_dt.
In the Insert statement in the same SQR , I'm inserting &c_dt into a date
field.
The insert executes successfully. But surprisingly , a date value(say
01-jun-1999') is inserted as ('01-jun-2099').
Could anyone throw some light on this ?. And let me know what the problem is