Resolve sorting issues by replacing 'date' with 'datetime'