readtable(). If necessary, add the duration variable corresponding to the time, to the datetime variable for the date -- though in what you show us, the times are all 0:0:0 so you probably do not need to do that.
Now sort() the table based upon the time.
After that it is just a matter of using
sort(randi(height(TheTable),2,number_of_sequences))
to have the first row correspond to the row index in the table for the start, and the second row correspond to the row index in the table to stop at.
Note: this does not distribute sizes equally. Smaller sequences are favoured; the descrease looks to be pretty much linear as size of the sequence increases.
Best Answer