Fix compare datetime