How to sort a random DateTime array from oldest to newest?

Length should definitely be replaced with Last Index. The +1 is also not correct, it will go out of bounds. Not sure about the rest.