Removed int casting for min/max to allow for dates

The max and min methods casted the result to an integer before returning - I don't really see a reason for this as the user should be aware of the data type on the database, and casting to an int prevents retrieval of min/max for dates and datetimes.