西元轉民國(C#)


西元轉民國(C#)_第1张图片


 DateTime dtNow = DateTime.Now;
 System.Globalization.TaiwanCalendar twC = new System.Globalization.TaiwanCalendar();
 textBox2.Text = DateTime.Now.Year.ToString() + DateTime.Now.Month.ToString("/##") + DateTime.Now.Day.ToString("/##");
 textBox1.Text = twC.GetYear(dtNow).ToString() + dtNow.ToString("/MM/dd"); 

你可能感兴趣的:(西元轉民國(C#))