c# yyyyMMdd,dd/MM/yyyy 類型字符串轉換爲datetime 類型

DateTime ConvertDate  = Convert.ToDateTime(DateTime.ParseExact(item.Key, "yyyyMMdd", null, System.Globalization.DateTimeStyles.AllowWhiteSpaces).ToString("yyyy-MM-dd"));it

 DateTime.ParseExact("18/05/2014", "dd/MM/yyyy", System.Globalization.CultureInfo.GetCultureInfo("en-US")).ToString("yyyy-MM-dd") ;io

相關文章
相關標籤/搜索