Type to datetime.