utcdtf.wbb - Convert Typical and OEM Text Date Formats To/from Julian Date

Syntax

CALL "utcdtf.wbb",tojul,format$,text$,juldate

Description

Many Business BASIC applications store dates in a string format rather than a julian number. Common formats include fixed digits, such as YYMMDD, and packed decimal, requiring a special formula to unpack into the month, day, and year elements. This low-level routine is designed to convert various formats to and from julian values.

Parameter

Description

tojul

Converts from julian date to text$ or from text$ to julian date. Set tojul to 0 to convert from juldate to text$, and 1 to convert from text$ to juldate.

format$

Sets the format of the date. format$ can be set to any of the following:

mdy MMDDYY
mdyy MMDDYYYY
ymd YYMMDD
yymd YYYYMMDD
dmy DDMMYY
dmyy DDMMYYYY
aon ADD+ON date format
soa State of the Art (MAS90) date format

 

text$

Stores the stored text version of the date, and juldate stores the julian integer version of the date.

The legal values for format$ match those for date fields in data templates. See the Data Templates section for additional information.