Delete Points after V_Max

Is there any code to delete all the points after the point of V_max?

Something like
DeletePoints V_maxloc, end, timess1 ?
Nevermind, I figured it out


WaveStats timess1
DeletePoints V_maxloc, V_endRow, timess1