截取时间的方法

protectd string CutTime(string time)
{
      DateTime date = Convert.DateTime(time);
      return   date.ToString("yyyy-MM-dd").SubString(0,4);
}
原文地址:https://www.cnblogs.com/candyzhmm/p/4270611.html