×
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.
On 04-Jun-2010 10:38, rob@xxxxxxxxx wrote:
Ok, some company tried using the technique below:
From the help on CVTDAT on 7.1
Only valid dates can be converted. If either the from-format or
the to-format use only 2 digits to specify the year (for example,
*MDY, *DMY, *YMD, or *JUL), valid dates are in the range of
January 1, 1940, to December 31, 2039. Otherwise, valid dates
are in the range of August 24, 1928, to May 9, 2071. If the year
is specified with only 2 digits, years in the range of 40 to 99
are assumed to be 1940 to 1999; years in the range 00 to 39 are
assumed to be 2000 to 2039. The command works in conjunction with
the QLEAPADJ system value.
However, 30 year mortgages are now hitting that wall.
Yes, they should use real date fields.
Any place to set a sliding scale to move that up a bit until they
fix it? Like change the cutoff from 40 to 50 or 60?
May be simple enough to just make your own hundred year window,
and then encapsulate that windowing in an alternate CL command. For
example, create a CVTDAT2070 CL command, where any two-digit year
values in range 00 to 70 "are assumed to be" the years 2000 to 2070.
The customized version of the /convert date/ function which uses
an alternate scale of 1971 through 2070 could always generate
four-digit year results which would still be capable for use on the
CVTDAT CL command. Finally, replace CVTDAT with CVTDAT2070 where
appropriate. Note that if a CVTDAT2070 command were allowed to
create two-digit year results in its window versus the window used
by CVTDAT, further manipulation of that ambiguous date value by the
CVTDAT command could be problematic; such results, if produced,
would best be limited to presentation, and only where that
date-window is understood by the viewers of the otherwise ambiguous
format.
For that same windowing assumption within a program using *MDY as
from-format, change any CVTDATE to replace the *MDY with *MDYY and a
variable like &myMDY with &myMDYY after:
chgvar &yy (%sst(&myMDY 5 2))
If (&yy *LE '70') +
then( chgvar &cc '20' )
Else ( chgvar &cc '19' )
chgvar &myMDYY ( %sst(&myMDY 1 4) *CAT &cc *CAT &yy )
Regards, Chuck
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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.