|
All right, starting to get somewhere. Here is my latest test:
SELECT all TrnDt,
SUBSTR(DIGITS((TRNDT+19000000)),1,4)
||'-'|| SUBSTR(DIGITS((TRNDT+19000000)),5,2)
||'-'|| SUBSTR(DIGITS((TRNDT+19000000)),7,2)
as TranDate
FROM DJBTEST03/ARHSTS$DB
The results:
Position to line . . .
....+....1....+....2.
TRNDT TRANDATE
104/06/15 0200-40-61
104/06/30 0200-40-63
104/06/21 0200-40-62
******** End of data ************
TRNDT is defined as 7 digits, 0 decimal, packed.
WHAT is going on here? Is the DIGITS function coming up with a 9-digit
number from the (TRNDT+19000000) result? Can I force the intermediate (?)
result to be 8 digits?
Can almost feel a solution...
db
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.