SyntaxFix
Write A Post
Hire A Developer
Questions
The following will do.
string datestring = DateTime.Now.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture);