dayofyear()
Learn how to use the dayofyear() function to return the day number of the given year.
Provides the integer that represents the day of the year for a specified datetime value.
Syntax
dayofyear(date)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| date | datetime | ✔️ | The datetime for which to determine the day number. |
Returns
The day number of the given year.
Examples
The following example shows how to extract the day of the year from a specified datetime value.
dayofyear(datetime(2015-12-14))
Output
| result |
|---|
| 348 |
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.