What's the simplest way to format a .NET DateTime according to YYYYMMDD or the like?

后端 未结 5 988
春和景丽
春和景丽 2020-12-11 09:20

I have a DateTime class and wish to display it according to some format... in this case, I specifically want to format it as YYYYMMDD format.

What\'s the best C#/.NE

5条回答
  •  天涯浪人
    2020-12-11 10:07

    I always use this site to get any dates formats etc. http://blog.stevex.net/index.php/string-formatting-in-csharp/

提交回复
热议问题