错误用法:
?Convert.ToDateTime("2005/12/22 22:22:22").ToString("YYYY/MM/DD HH:MM:SS")
"YYYY/12/DD 22:12:SS"
?Convert.ToDateTime("2005/12/22 22:22:22").ToString("yyyy/mm/dd hh:mm:ss")
"2005/22/22 10:22:22"
"YYYY/12/DD 22:12:SS"
?Convert.ToDateTime("2005/12/22 22:22:22").ToString("yyyy/mm/dd hh:mm:ss")
"2005/22/22 10:22:22"
正确用法:
Convert.ToDateTime("2005/12/22 22:22:22").ToString("yyyy/MM/dd HH:mm:ss")
"2005/12/22 22:22:22"
"2005/12/22 22:22:22"