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

前端 未结 5 1281
孤街浪徒
孤街浪徒 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:25

    If you use MVC, tables, it works like this:

    @(((DateTime)detalle.fec).ToString("dd'/'MM'/'yyyy"))
    

提交回复
热议问题