Usage of DateTime TOSTRING format

xiaoxiao2021-03-31  249

The size of the date object TOSTRING method format has an impact on the output result. as follows.

Error usage:

? 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"

Right usage:

Convert. TodateTime ("2005/12/22 22:22:22"). TOSTRING ("YYYY / MM / DD HH: MM: SS") "2005/12/22 22:22:22"

转载请注明原文地址:https://www.9cbs.com/read-130962.html

New Post(0)