|
First that dd/mm/yy format of you limey's had me a bit confused, but I got
past that. My sample will be 'Yankeefied'. But I think you've got a lot
of busy work in taking the current date, converting it to character and
immediately converting it back to a date. Try this.
DATE1 digits(datenbr)
DATE2 substr(date1,5,2)||'/'||
substr(date1,7,2)||'/'||
substr(date1,3,2)
NEWDATE date(date2)
NEWTODAY current(date)
RESULT days(newdate) - days(newtoday)
....+....1....+....2....+....3....+....4....+....5....+....6....+
DATE1 DATE2 NEWDATE NEWTODAY RESULT DATENBR
20050131 01/31/05 01/31/05 05/18/06 472- 20,050,131
00000000 00/00/00 ++++++++ 05/18/06 ++++++++++++ 0
See, no abnormal errors. Just plus signs.
What happens if you convert the zeros to nulls?
update qtemp/limey
set datenbr=null where datenbr=0
....+....1....+....2....+....3....+....4....+....5....+....6....+
DATE1 DATE2 NEWDATE NEWTODAY RESULT DATENBR
20050131 01/31/05 01/31/05 05/18/06 472- 20,050,131
- - - 05/18/06 - -
Rob Berendt
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.