Convert to date if needed