how to give format DateTime.Date?

前端 未结 7 645
滥情空心
滥情空心 2021-01-29 10:47

DateTime dt = DateTime.Now dt.Date is created to 31.10.2012 00:00:00 .it is created to dd.mm.yyyy format but i need dd/mm/yyyy. Can i use: return new DateTime(d.Year, d.Month

相关标签:
7条回答
  • 2021-01-29 11:32
    var dt = DateTime.Now;
    var stringDt = dt.Date.ToString("dd/MM/yyyy");
    
    0 讨论(0)
提交回复
热议问题