Learn the use of DateTime.ParseExact in C# (picture)
I did a test,
now = 2015/3/ 7. There is no problem in using "yyyy/M/d" to format the string, but there is a problem. What if today is not the 7th, nor is it March?
If it is October, what about the 17th?
After testing, it turns out that this is compatible. The format string using "yyyy/M/d" is still available and does not need to be changed to "yyyy/MM/dd". This way the problem is much simpler to solve.
Reference: //m.sbmmt.com/
I did a test,
now = 2015/3/7, format it like this There is no problem with using "yyyy/M/d" for the string, but there is a problem. What if today is not the 7th, nor is it March?
If it is October, what about the 17th?
After testing, it turns out that this is compatible. The format string using "yyyy/M/d" is still available and does not need to be changed to "yyyy/MM/dd". This way the problem is much simpler to solve.
Reference: https://msdn.microsoft.com/en-us/library/w2sa9yss.aspx
The above is the detailed content of Learn the use of DateTime.ParseExact in C# (picture). For more information, please follow other related articles on the PHP Chinese website!