utcdate.wbb

Convert text date to internal julian integer or date/time number.

Syntax

CALL "utcdate.wbb",strdate$,juldate

This low-level routine is used to convert a text string to a julian date value. The current Business Basic default date format is used to determine whether the format is month-day-year, or day-month-year, and the text string is parsed. In BBx and Pro5, the value of STBL("!DATE") is used for this analysis.

The following steps are performed:

If a time is found at the end of strdate$, it is analyzed and converted to a fraction of a day (noon is .5, 6:00 pm is .75) to be added to the julian integer. The time must be in the format h:mm and may be followed by a word starting with "p" to force a "pm" assumption.

If possible, month names are replaced with month numbers.

strdate$ is tested for simple numeric dates, such as 030196 or 11301995, and converted to a julian value.

Finally, strdate$ is scanned for three numerics, separated by any non-numeric delimiter, such as 3/1/96 or 11-30-1995, and converted to a julian number.