Counting days by month
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
dan berkowitz
am 22 Okt. 2017
Kommentiert: Andrei Bobrov
am 23 Okt. 2017
hi,
i have a 100x11 char array with dates (e.g. '03-Jan-2006'). how can i create an array with the number of days in each unique month that appear in my date array. (e.g. if i have two days in january 2006, then i want it to return 2). any help would be appreciated. thx in advance.
DB
0 Kommentare
Akzeptierte Antwort
Andrei Bobrov
am 22 Okt. 2017
Bearbeitet: Andrei Bobrov
am 22 Okt. 2017
Here A - your array "100x11 char array with dates (e.g. '03-Jan-2006')"
z = datetime(A);
T = table(datetime(z,'F','MMM-uuuu'),eomday(year(z),month(z)),'v',{'date','days'});
4 Kommentare
Siehe auch
Kategorien
Mehr zu Dates and Time finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!