Set DateTimePicker Control to format YYYYMMDD? Anonymous User499913-Nov-2013I’m using the date time picker control in simple windows form application and I want to format the date in YYYYMMDD format as it is my need. How to do it?c#c# Updated on 13-Nov-2013
Anonymous User
13-Nov-2013You need to get the DateTime value from the date time picker then change it to string with the format.
string formateddate = dtpDate.Value.ToString("yyyyMMdd");
Hope this will solve your problem.