SyntaxFix
Write A Post
Hire A Developer
Questions
A more simple way I came across while searching for this answer as well;
string date = DateTime.Now.ToString("yyyyMMdd", System.Globalization.CultureInfo.GetCultureInfo("en-US"));