MATLAB: Divide data according to year, month, day

devide datetime array

Hi guys
I have a set of datatime array data in the following format. I wanted to categorize them in groups acording to year, month and day. Does anyone know how to do this? Thanks in advance!
1×2 datetime array:
23-Aug-2018 12:23:52 15-Oct-2017 14:43:56

Best Answer

See if the findgroups (link) function (introduced in R2015b) will do what you want.