Good News Everybody!
The new search engine is LIVE!
Please report any problems to david (at) midrange.com.
|
Pete,
You've got #DateISO defined as a date data type yet you're assigning an
integer to it.
#DateISO = %int(...)
Try
#DateISO = %date(#SYDAT:*cymd) + %days(14)
HTH,
Charles
> -----Original Message-----
> From: Peter Vidal [mailto:Peter_Vidal@xxxxxxxx]
> Sent: Tuesday, April 13, 2004 1:20 PM
> To: rpg400-l@xxxxxxxxxxxx
> Subject: CYYMMDD date to *ISO and back
Hi list!
I am testing some code that I found in the forum for date conversions. I
do not know what I am doing wrong here. I want to add 14 days to a field
that is (7,0) and have the original date and the new date for logic
inquiries later in the program. However, I am having an error and I can't
see it...
0001.00 D #SYDAT S 7S 0 Inz(1040413)
0002.00 D #DateISO S D DatFmt(*ISO)
0003.00 D #DatNum7 S 7S 0
0004.00
0005.00 /Free
0006.00 #DateISO = %int(%char(%date(#SYDAT:*cymd) +
%days(14):*iso0));
0007.00 #DatNum7 = %int(%char(#DateISO:*cymd0));
0008.00 /End-Free
0009.00
0010.00 C Eval *INLR = *ON
Msg id Sv Number Seq Message text
*RNF7416 30 6 000600 The types of the right and left hand side do
not match in
the EVAL operation.
This mailing list archive is Copyright 1997-2026 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.