C#将时间格式由yyyyMMdd转化成yyyy-MM-dd
2021-01-30 01:15
标签:time orm bsp nbsp ati span string inf ali C#将时间格式由yyyyMMdd转化成yyyy-MM-dd 标签:time orm bsp nbsp ati span string inf ali 原文地址:https://www.cnblogs.com/AduBlog/p/14343064.html string str = DateTime.Now.ToString("yyyyMMdd");
string[] format = {"yyyyMMdd"};
DateTime date;
if (DateTime.TryParseExact(str,
format,
System.Globalization.CultureInfo.InvariantCulture,
System.Globalization.DateTimeStyles.None,
out date))
{
....
}
else
....
上一篇:windows terminal
下一篇:delphi窗体按钮灰化禁用
文章标题:C#将时间格式由yyyyMMdd转化成yyyy-MM-dd
文章链接:http://soscw.com/index.php/essay/48939.html