MATLAB Function Reference | Search  Help Desk |
weekday | Examples See Also |
[N,S] = weekday(D)
[N,S] = weekday(D)
returns the day of the week in numeric (N
) and string (S
) form for each element of a serial date number array or date string. The days of the week are assigned these numbers and abbreviations:N |
S |
N |
S |
1 |
Sun |
5 |
Thu |
2 |
Mon |
6 |
Fri |
3 |
Tue |
7 |
Sat |
4 |
Wed |
|
|
[n,s] = weekday(728647)or
[n,s] = weekday('19-Dec-1994')returns
n = 2
and s = Mon
.
datenum
Serial date number
datevec
Date components
eomday
End of month