Formatting a datetime string in the YYYYMMDD format I'm working with some strange APIs that requires the dates to be sent in the YYYYMMDD format.

I was thinking of doing something like this:

string date = string.Concat(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day);


Is there a better practice?
Yes there is: Date Formatting

var dateString = DateTime.Now.ToString("yyyyMMdd");