← dayofyear operator page · time/dayofyear/sc/april_in_a_leap_year
pandas ✅ · DuckDB ✅
dayofyear(SC_1) on a scalar date, SC_1 = 2020-04-07, from the example that the manual misplaced on the Days between two dates page, its Example 2.
Extract time period: "The operator dayofyear returns the ordinal day within the year (between 1 and 366)"; and dayofyear (2020-04-07); "returns 98".
DS_r = 98, an Integer: 31 + 29 (2020 is a leap year) + 31 + 7.
DS_r := dayofyear(SC_1);
| SC_1 |
|---|
| 2020-04-07 |
{
"scalars": [
{"name": "SC_1", "type": "Date"}
]
}
{
"scalars": [
{"name": "DS_r", "type": "Integer", "value": 98}
]
}