Convert Date to “dd-MMM-yyyy” format c#

后端 未结 5 1380
名媛妹妹
名媛妹妹 2021-01-17 09:15

Guys i am unable to convert datetime to \"dd-MMM-yyyy\" format. My code is given below:

TreeNode tn = new TreeNode(dr[\"pBillDate\"].ToString());       // He         


        
5条回答
  •  一向
    一向 (楼主)
    2021-01-17 09:55

    Try this code:

    string formattedDate = YourDate.ToString("dd MMM yyyy");
    

    It will format to like:

    12 Nov 2012
    

提交回复
热议问题