extracts day from datetime
d = day(dt, dayType)
string with possible values: "dayofmonth" (default value), "dayofweek", "iso-dayofweek", "dayofyear", "name" and "shortname"
day value(s) (double) or day name(s) (string)
d = day(dt) returns the day value(s) of the input argument
dt.
d = day(dt, dayType) returns the day value(s) or day name(s)
depending on dayType:
"dayofmonth", day-of-month values (default)
"dayofyear", day-of-year value, from 1 to 365 or 366.
"dayofweek", day-of-week value, from 1 to 7, where 1 corresponds to "Sunday"
"iso-dayofweek", day-of-week value, from 1 to 7, according to the ISO 8601 standard, where 1 corresponds to "Monday"
"name", full day names. If dt contains NaT values, they will be replaced by "".
"shortname", abbreviated day names. If dt contains NaT values, they will be replaced by "".
Extracts day values from dt
dt = datetime(2025, 2, 5) d = day(dt) dt = datetime(2025, 3, 15):caldays(20):datetime(2025, 7, 26) d = day(dt) | ![]() | ![]() |
With "dayofyear" keyword
dt = datetime() d = day(dt, "dayofyear") | ![]() | ![]() |
With "dayofweek", "iso-dayofweek", "name" and "shortname" keyword
| Version | Description |
| 2025.1.0 | Introduction in Scilab. |