I am now trying to get the maximum value for a timestamp that has the following format:

mm-dd-yyyy hh:mm:ss.sss

I have tried using the MAX aggregate, but it will give me all of the values with the maximum date. I have tried casting it to a TIME data type, but it only gives me the maximum for the hh:mm:ss. What I need to do is get the most recent ss.sss value.

How is this done?