|
Gail,
I have the following:
Define Result Fields
Field Expression Column Heading Len
Dec
DT '1022803'
C substr(dt,1,1)
CNUM (day(date('01/'||c||'1/01')))/10 1
0
CC cnum+19 2
0
MM substr(dt,2,2)
DD substr(dt,4,2)
YY substr(dt,6,2)
THEDATEC digits(cc)||yy||'-'||mm||'-'||dd
THEDATE date(thedatec)
NBRDAYS days(thedate) - days(date('2003-0
2-01'))
If I switch DT from '1022803' to '0022803' it doesn't work. I think it is
because IBM thinks that 1903-02-28 is an invalid date. Probably outside
of their window.
....+....1....+....2....+....3....+....4....+....5....+....6....+...
DT C CNUM CC MM DD YY THEDATEC THEDATE NBRDAYS
1022803 1 1 20 02 28 03 2003-02-28 02/28/03 27
1022803 1 1 20 02 28 03 2003-02-28 02/28/03 27
CNUM is just there to convert this 1 digit character to a number.
Will this work?
Rob Berendt
--
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
Benjamin Franklin
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.