标签:style blog http os 2014 art
原文: DateTime.ToString("dd/MM/yyyy");后,不能直接Convert.ToDateTime的解决:
DateTime.ToString("dd/MM/yyyy");后,不能直接Convert.ToDateTime的解决:
DateTime.ParseExact(this.DateBegin.Text, "dd/MM/yyyy", System.Globalization.CultureInfo.GetCultureInfo("en-US")).ToString("yyyy-MM-dd") ;
DateTime dt = DateTime.ParseExact(dateString, "yyyy/mm/dd", CultureInfo.InvariantCulture);
DateTime dt = DateTime.Now;
string dateAsString = dt.ToString("dd/MM/yyyy");
// If the source data is a string
string dtString = "2014/03/12";
DateTime dtTarget;
if (DateTime.TryParseExact(dtString,
"yyyy/MM/dd",
System.Globalization.CultureInfo.CurrentCulture,
System.Globalization.DateTimeStyles.None,
out dtTarget))
{
dtString = dtTarget.ToString("dd/MM/yyyy");
}
DateTime.ToString("dd/MM/yyyy");后,不能直接Convert.ToDateTime的解决:,布布扣,bubuko.com
DateTime.ToString("dd/MM/yyyy");后,不能直接Convert.ToDateTime的解决:
标签:style blog http os 2014 art
原文地址:http://www.cnblogs.com/lonelyxmas/p/3813242.html