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?
I am surprised no one has a link for this . any format can be created using the guidelines here:
Custom Date and Time Format Strings
For your specific example (As others have indicated) use something like
my_format="yyyyMMddHHmmss";
DateTime.Now.ToString(my_format);
Where my_format can be any string combination of y,M,H,m,s,f,F and more! Check out the link.