C#实现获取当前的年(2位)+月(2位)+日(2位)
//获取当前年月日 var year = DateTime.Now.Year.ToString().Substring(2, 2); var month = DateTime.Now.Month.ToString().PadLeft(2, '0'); var day = DateTime.Now.Day.ToString().PadLeft(2, '0');
转: https://blog.csdn.net/Yanzudada/article/details/104398586