GetDayOfYear

This function evaluates to a number which represents the day of the year of the given datetime.

Description

The day of the year as a one-based integer in units of time.

Type

NUMERIC

Arguments

Type

Meaning

1

DATETIME

the datetime whose day of the year to determine

Evaluation

The datetime argument; which may be specified symbolically, is converted into an actual datetime. Then, the day of the year in which the datetime is contained, is determined.

This function requires that the specified datetime resolve to a fully specified datetime or an error will occur.

Comments

When displayed, the return value will be displayed according to the active unit scheme’s time unit type rule. For example, if the active unit scheme displays Time values as Hours, then the return value for @”January 2” will be displayed as 48 “hours”.

To convert the return value into a dimensionless value representing the number of days, divide it by 1 “day”.

As elsewhere in RiverWare, 24:00 hours is considered to be the day which is ending, and 00:00 hours is considered to be the day which is just beginning.

 
GetDayOfYear(@"February 23, 1996")
 
54.0 “day” or 1296 “hour”