How do I get today's date in C# in mm/dd/yyyy format?

后端 未结 8 2009
长情又很酷
长情又很酷 2020-12-29 01:00

How do I get today\'s date in C# in mm/dd/yyyy format?

I need to set a string variable to today\'s date (preferably without the year), but there\'s got to be a bette

8条回答
  •  感情败类
    2020-12-29 01:15

    DateTime.Now.Date.ToShortDateString()
    

    I think this is what you are looking for

提交回复
热议问题