portableSql

DayOfYear Portable SQL Function

Syntax

DayOfYear as N (DateTime as D)

DayOfYear as N (DateTime as T)

Arguments

DateTimeDate Time

A field or value.

Returns

resultNumeric

Returns the day number of the year from a date or time value.

Description

Extract the day number of the year from a date or time value.

Discussion

The DayOfYear function extracts the day number of the year from a date or time value.

DayOfYear() function executed on the Northwind Access database
SELECT FIRST 1 CurrentDateTime() AS Now, DayOfYear(CurrentDateTime()) AS Expr1 FROM Orders
=10/10/2019 12:48:35 00 pm|283