I want to convert a C# DateTime to \"YYYYMMDDHHMMSS\" format. But I don\'t find a built in method to get this format? Any comments?
You can use a custom format string:
DateTime d = DateTime.Now; string dateString = d.ToString("yyyyMMddHHmmss");
Substitute "hh" for "HH" if you do not want 24-hour clock time.