Maximum doesn't really work that way. You can return the maximum value for a number value, but not for a date.
If you just want to get the last modified version of a document, you can use a subselect to get the latest revision, and add the criteria to get the latest iteration. Since you have the latest version that typically should be the last modified of the document.
If you wanted to be more sure to get the latest modified (again, I'll use a document as an example), you could do a subselect and return the maximum object persist ID. I believe Windchill assigns these numbers sequentially, so the maximum you get will be the most recent created.
I'm trying to understand how to use the Database function, so I tried to display maximum of 'Height' (defined as Real Number) ,but I got an error message (see attached picture).