Previous Topic: $GLOBAL()Next Topic: $ISPFSTAT()


$GREG2JUL()

This function converts a Gregorian-format date to Julian format.

Syntax

juldate = $GREG2JUL(gregdate)

Parameters

juldate

Julian-format date: yy.ddd or yyyy.ddd. The number of digits that are assigned to the year is the same as specified in the Gregorian format, two or four. The day of the year is left-padded with zeros to three characters.

gregdate

Gregorian-format date: mm/dd/yy or mm/dd/yyyy. The number of digits that are assigned to the year is carried over to the result and must be two or four. The length of the month and day fields is unimportant, except that the date must be valid.

Return Codes

101

ARG 1 MISSING OR INVALID

121

INVALID YEAR

122

INVALID MONTH

123

INVALID DAY

Example

$GREG2JUL('12/31/99') ==  '99.366'
$GREG2JUL('1/1/2000') == '2000.001'