Title: | Oracle Rally |
Notice: | Rally Kits moved from CLT to Wilbry |
Moderator: | OOTOOL::CRAIG |
Created: | Fri Mar 23 1990 |
Last Modified: | Wed Jun 04 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 2942 |
Total number of notes: | 14664 |
RALLY is passing bogus date data in ADLs. I got this on 7.0. Customer saw it on 6.1. Create a date global, XXX. Create an RMS DSD that has a date field in it. Now do the following in ADL: var id : number; status : number; begin xxx := last_day(system_date); db_open(date,id,status); DATE.DATE1 := xxx; db_insert(id,status); db_commit(status); end; In SQL do SELECT * from <table>; If run today the value should be: 30-APR-1997 00:00:00.00 ... and that's what SQL itself inserts. But RALLY inserts: 30-APR-1997 00:00:00.32 Oher times it is .95 or .27, but never .00. To work around it do: date.date1 := to_date(to_char(xxx,'dd-mon-yyyy'),'dd-mon-yyyy'); This chops off the time portion of the string.
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
2932.1 | M5::JOPPELT | New packaging. Same contents. | Mon Apr 07 1997 13:15 | 3 | |
I did a little more playing with this. It seems that the problem is coming from the LAST_DAY function, which is documented as returning only the date portion. | |||||
2932.2 | Use TRUNC to remove time component | ORAREP::JRFVAX::FREDRICKSON | Rallyho lads! | Thu May 01 1997 09:50 | 16 |
>> To work around it do: >> >> date.date1 := to_date(to_char(xxx,'dd-mon-yyyy'),'dd-mon-yyyy'); >> >> This chops off the time portion of the string. Just as a side note... A quick way to get the 'last_day' and cut off the time component is: xxx := last_day (trunc (system_date, 'DDD')); I does take the time component completely down to zeroes. Steve |