//要加上System.Globalization;并且yyyy和d都是小写,M是大写,如果是YYYY年MM月dd日,那单位的月和日前面都会加上了0
Convert.ToDateTime(txtTime.Text.Trim()).ToString("yyyy年M月d日", DateTimeFormatInfo.InvariantInfo);
Convert.ToDateTime(txtTime.Text.Trim()).ToString("yyyy年M月d日", DateTimeFormatInfo.InvariantInfo);