Modify application wide, the display of DateTime

后端 未结 3 704
北荒
北荒 2021-01-25 03:12

For an application we develop, we use the \"G\" format everywhere in our application.

We want to change a little bit this format:

We need to display

3条回答
  •  忘了有多久
    2021-01-25 03:55

    I'd create an extension method for DateTime, something like a ToPrettyPrintStringg() or whatever you wanna call it that returns the date in the format you wish, this way you can get it to display any date the way you want everywhere.

提交回复
热议问题