DayOfYear
Converts a date to the number day of the year, from 1 (Jan 1) to 365 (Dec 31). Accounts for leap years.
Syntax
Function arguments:
Examples
Converts Jan 1, 2023 to the number day of the year, and returns 1.
Converts Dec 31, 2023 to the number day of the year, and returns 365.
Converts Mar 1, 2023 to the number day of the year, and returns 60.
Leap Year Examples
Converts Dec 31, 2024 to the number day of the year, and returns 366.
Converts Mar 1, 2024 to the number day of the year, and returns 61.
Timezone Examples
Converts Jan 1, 2023 16:00:00Z to the number day of the year in New York, and returns 2
Converts Jan 3, 2023 02:00:00Z to the number day of the year in Sydney, and returns 3
Converts Jan 15, 2023 18:00:00Z to the number day of the year in Seoul, and returns 16
Converts Jan 1, 2023 03:00:00Z to the number day of the year in Los Angeles, and returns 365

