|
Try these code fragments, (not tested):
H DatFmt(*ISO)
D DateDstr DS
D WorkNum 8S 0
D WorkChar 8A Overlay(WorkNum)
D v_Numeric8 S 8P 0
D V_ISO S D Inz(*Sys)
/Free
// For V5R1
WorkChar = %Char(v_Iso:*USA0);
v_Numeric8 = WorkNum;
// For V5R2
v_Numeric8 = %Dec(%Char(v_ISO:*USA0):8:0);
/End-Free
Conversion of a date data-type back to a numeric is a little tricky at V5R1
in free-format. (Another alternative is to use the C-language function
atol - which requires the use of the QC2LE Binding Directory.)
At V5R2 the various BIFs for numeric conversion (%DEC, %INT, %FLOAT, etc.)
allow for character arguments.
Brian Parkins
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.