2.5.4.26 DayOfYear

The DayOfYear function returns the day of the year, according to the Gregorian calendar, from a value representing a date and time.

ABNF:

 DayOfYear = val [val] sp ("1" / "2") ";DAYOFYEAR():129"

Required Arguments:

Name: DateTimeArg

Type: vAny

An argument that specifies a date and time value.

Optional Arguments:

Name: Locale

Type: vLanguageID

An argument that specifies an LCID to use when parsing DateTimeArg.

Return Value:

Type: PtgUnsWord, PtgErr

This function attempts a conversion, as described by the DateTime function, of DateTimeArg to a PtgDate. If the conversion succeeds, the function returns a PtgUnsWord containing the day of the year component from DateTimeArg. The value is greater than or equal to 1 and less than or equal to 366. If the conversion fails, the function returns a PtgErr with an error code of #VALUE!.