DateTime   dt;  
     
  DateTimeFormatInfo   dtFormat   =   new   System.Globalization.DateTimeFormatInfo();  
  dtFormat.ShortDatePattern="yy-MM-dd"   ;  
  dt=Convert.ToDateTime("04-05-06",dtFormat);  
  Response.Write(dt.ToString("yyyy-MM-dd"));  
   
  dtFormat.ShortDatePattern="MM-dd-yy"   ;  
  dt=Convert.ToDateTime("04-05-06",dtFormat);  
  Response.Write(dt.ToString("yyyy-MM-dd"));  
   
  dtFormat.ShortDatePattern="dd-MM-yy"   ;  
  dt=Convert.ToDateTime("04-05-06",dtFormat);  
  Response.Write(dt.ToString("yyyy-MM-dd"));

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-29
  • 2022-01-06
  • 2021-08-06
  • 2022-12-23
  • 2021-09-02
猜你喜欢
  • 2022-12-23
  • 2021-12-26
  • 2021-06-14
  • 2021-11-28
  • 2022-02-12
  • 2021-09-12
相关资源
相似解决方案