How to count number of days within datetime array
Show older comments
I have a timetable which spans a year. The intervals between the datetimes varies from one minute to ten minutes. I am interested in finding out how many days contain any data at all. I tried using histogram but this returns an empty bin on days in which there was no data collected, and so conflates days where there was data collected but the values were 0, and data where there was no data collected.
numberdays=histogram(timetable.DateTime,'BinMethod','day');
This seems like it should be simple but I am sorry I can't figure it out!
Accepted Answer
More Answers (1)
Categories
Find more on Data Type Conversion in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!