如果是DateTime类型:直接使用DateTime ToString("格式")方法 str = DateTime Parse("2010-7-7") ToString("yyyy MM dd");如果是String类