Getting a short day name

前端 未结 5 2316
一生所求
一生所求 2021-02-18 13:51

I was wondering on how to write a method that will return me a string which will contain the short day name, example:

    public static string GetShortDayName(Da         


        
5条回答
  •  情歌与酒
    2021-02-18 14:10

    You can use "ffffd" in in a custom format string to get the short day name. For example.

    DateTime.Now.ToString("ffffd");
    

    As suggestby @Loudenvier in comments.

提交回复
热议问题