Easy to Create, Easy to Change - Easy to use!

Function::DateTime

YearDay



Parameters


Returns/Result


Examples


Reference

yearday

Type

Date Function

Purpose

The yearday function converts a date value to the Julian day of the year (1-366).

Syntax

yearday( DATE VALUE)

Returns

An integer value from 1 to 366 (inclusive). The date format selected in Windows Control Panel changes the date sequence but does not affect which value is returned by a Date function.

Examples

yearday( 12/31/99)

Returns: 365 ( most North American formats)

 

yearday( 31/12/99)

Returns: 365 ( most European formats)

 

yearday( 95/12/31)

Returns: 365 (parentheses Metric format)parentheses

 

yearday( DATE)

Converts the day portion of the value in the DATE field into an integer from 1 to 366, representing the Julian date, for every record processed. If a record contains the value 12/31/00 (a Leap Year) in the DATE field, the function returns 366.

See Also


On the forum about YearDay

On the blog about YearDay