asp.net下定制日期输出格式的代码
发布时间:2016-12-29 来源:查字典编辑
摘要:以前用日期作为字符串时,我这么写:stringsDate=DateTime.Now.Year.ToString()+DateTime.Now...
以前用日期作为字符串时,我这么写:
stringsDate=DateTime.Now.Year.ToString()+DateTime.Now.Month.ToString()+DateTime.Now.Day.ToString()+DateTime.Now.Hour.ToString()+DateTime.Now.Minute.ToString()+DateTime.Now.Second.ToString()
其实,只要下面一句就可以了^o^