why does DateTime.ToString(“dd/MM/yyyy”) give me dd-MM-yyyy?

前端 未结 5 1282
孤街浪徒
孤街浪徒 2020-11-29 19:52

I want my datetime to be converted to a string that is in format \"dd/MM/yyyy\"

Whenever I convert it using DateTime.ToString(\"dd/MM/yyyy\"), I get

5条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-29 20:49

    Dumb question/answer perhaps, but have you tried dd/MM/yyyy? Note the capitalization.

    mm is for minutes with a leading zero. So I doubt that's what you want.

    This may be helpful: http://www.geekzilla.co.uk/View00FF7904-B510-468C-A2C8-F859AA20581F.htm

提交回复
热议问题