SyntaxFix
Write A Post
Hire A Developer
Questions
try ToString method for your desirer format use
DateTime.Now.ToString("yyyy-MM-dd");
OR you can use it with your variable of DateTime type
dt.ToString("yyyy-MM-dd");
where dt is a DateTime variable