This called routine is used to convert a date to different display formats. For web applications, see CDW055 which formats dates entered during a web form.
Calling Format:
CALL "CDS055", DIN$, DAT$[ALL]
You do not need to pre-dimension DAT$[ ]
before calling. Excellware
recommends that all dates be stored in julian format. If using
templates, store julian dates in a U(3) format otherwise use an N(7) format.
Note that Dynamo Tools use a slightly different convention for an
unassigned date field than the BBx/BBj DATE()
function. Dynamo Tools
considers a zero value julian date field as unassigned. BBx treats a
zero value julian date as today's date, and uses a negative one value to
mean unassigned. Dynamo Tools uses zero as unassigned so that
dimensioning a string template that contains date fields does not require
setting each date field to negative one.
Y2K Considerations: This program as well as all Dynamo Tools, uses a sliding window to determine the full 4 digit year. Since the input routine does not allow for entry of the full 4 digit year, the full 4 digit year must be assumed.
The rule that is used on BBx Progression 4, was a fixed window, where any year less than 50, is considered 20xx, and any year 50 to 99 was considered 19xx.
The PRO/5 and BBj version of these programs permit entries of years up to 9 years in the future, and 90 years in the past. For example, if today is 02/14/99, then 2 digit years of 00,01,02,03,04,05,06,07 and 08 will be considered 20xx. All others are considered 19xx. If today is 02/14/2010, then 2 digit years of 00 through 19 will be considered 20xx. All others are considered 19xx.
Note that it is only possible to convert a date prior to 90 years ago, or after 9 years from this year, using the Julian format or one of the formats that include a 4 digit year.
Examples |
>CALL "CDS055","04/15/05",DAT$[ALL]
|
>CALL "CDS055",STR(JUL(2004,12,31)),DAT$[ALL]
|
>CALL "CDS055","20050315",DAT$[ALL]
|
|