asp.net下定制日期输出格式的代码
程序员文章站
2024-02-04 19:12:52
以前用日期作为字符串时,我这么写: string sdate = datetime.now.year.tostring() +&nb...
以前用日期作为字符串时,我这么写:
string sdate = 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^
string sdate = 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^
下一篇: 会声会影素材怎么添加漩涡转场效果?