×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
Hi Doug,
0101.05 TestDateN = %Dec(%Date(Tsw3:*Cymd):*Iso);
0101.06 TestDateN = %dec(%Date(TestDateN:*cymd)+ %days(1));
Shouldn't that second line have *iso instead of *cymd? You've already
converted the date to *ISO at that point...
I think the "receiver too small" error is coming from the fact that
you're trying to tell the system that an 8,0 date is actually a 7,0
date. So when the %date() BIF tries to read an 8-digit date, the
internal *CYMD can't hold the result. Changing the second line to *ISO
should solve that problem.
However... if you read what your code does (Step-by-step) you'll see
that it does this:
a) read numeric date from file
b) Convert numeric date (cymd) to date field
c) Convert date field to numeric field (iso)
d) convert numeric field (iso) to date field again
e) add a day to date field
f) convert back to numeric field, iso
Wouldn't it be a lot cleaner to convert it to a date once, add a day,
then convert it back to a number? Just one line of code like this:
TestDateN = %Dec(%Date(Tsw3:*Cymd) + %days(1):*Iso);
It just seems simpler... read the number (cymd), make it a date field,
add a day, convert it back to a number (iso).
As an Amazon Associate we earn from qualifying purchases.