You are here: Development Standards > Routines > General Routines > GENDATE.PUB

# GENDATE.PUB

GENDATE.PUB is a public program for converting dates in string format to a Julian number. GENDATE.PUB is called by GENINPUT.PUB when date fields are used as input (GENINPUT with X3=6).

`0040 ENTER X$,X1$,X,X0,X1,X3`

Variable | Description
X$ | Date as defined in GENDATE
X1$ | Date mask for date
X | Julian date of X$. These values are returned if a problem is found: -1 - a blank date -9 - an invalid date
X0 | Row of date field as defined in GENDATE
X1 | Column of date field as defined in GENDATE
X3 | Input field type as defined in GENDATE

Exit Points | Explanation
EXIT | GENDATE.PUB does not return any errors.

GENDATE.PUB translates the date string into a Julian number. The global variable "DATEMASK" is used to interpret the format of the date string. The date string is then reformatted and is redisplayed on the screen if X3 is set to 2 for string input with a mask.