📜  TaiwanCalendar datetime.parseexact - 任何代码示例

📅  最后修改于: 2022-03-11 14:57:33.640000             🧑  作者: Mango

代码示例1
string s = "1050402";
            s = s.PadLeft(8, '0');
            var ci = new CultureInfo("zh-TW", true);
            ci.DateTimeFormat.Calendar = new TaiwanCalendar();
             var d = DateTime.ParseExact(s, "yMMdd", ci);
            Console.WriteLine(d);
            Console.ReadLine();