Previous Topic: $ISPFSTAT()

Next Topic: $SERVER()

$JUL2GREG()

Use the $JUL2GREG() function to convert a Julian-format date to Gregorian format.

Syntax

The $JUL2GREG() function has this syntax:

gregdate = $JUL2GREG(juldate)

Arguments

The $JUL2GREG() function takes these arguments:

gregdate

Gregorian-format date: mm/dd/yy or mm/dd/yyyy. The number of digits assigned to the year will be the same as specified in the Julian date. The month and day fields will be two digits each, and will be left-padded with a zero, if needed.

juldate

Julian-format date: yy.ddd or yyyy.ddd. The number of digits assigned to the year will be carried over to the result and must be either two or four. The number of digits occupied by the day is unimportant except that it must represent a valid date.

Return Codes

The $JUL2GREG() function produces these return codes.

101 ARG 1 MISSING OR INVALID

121 INVALID YEAR

122 INVALID DAY

Example

$JUL2GREG('96.366')  ==  '12/31/96'
$GREG2JUL('2000.001') == '01/01/2000'