getDatasetMaxTime function

Get dataset max time.