MATLAB: Is there a function in MATLAB to split the dataset into 70% for training and 30% for validation

splittrainingvalidation

I have date payment records data set which I want to split for training and validation.
The modeling is to be done in excel, it is only the split that I am trying to do in MATLAB such that both sets have evenly distributed data of the entire period.
Is there a direct function that can split the data into 70% for training and 30% for validation ?