Good afternoon all,
As always, thank you in advance for your help.
I have made a windows form in VS 2019 and have a datetimePicker item. The form data is saved in CSV format and then used in Tableau.
The date is stored as ddMMyyyy when saved which is a huge problem. For example, If saved data on 5th Aug 2020, I want it to save it as YYYYMMDD (2020-08-05) but it saves it as 05-08-2020. When I open the saved file, it will show the date as May 08 2020.
I simply want the date format to save as YYYY-MM-DD..
- private void dateTimePicker1_ValueChanged(object sender, EventArgs e)
- {
- dateTimePicker1.Format = DateTimePickerFormat.Custom;
- dateTimePicker1.CustomFormat = "yyyyMMdd";
- }
- Private void textbox8_Textchanged(object sender, EventArgs e)
- xlworksheet.Cells[1, 1] = textBox1.Text;
- xlworksheet.Cells[1, 2] = dateTimePicker1.Value;

Amit GuptaPosted Nov 27, 2020, 4:56 AM
Shane NicholsonPosted Nov 20, 2020, 9:30 AM
I changed the format to yyyyMMdd and removed it completely and still get the same outcome.
Ben ThompsonPosted Nov 20, 2020, 7:48 AM
Amit GuptaPosted Nov 20, 2020, 6:13 AM
Shane NicholsonPosted Nov 20, 2020, 5:22 AM
Amit GuptaPosted Nov 20, 2020, 4:44 AM
Shane NicholsonPosted Nov 20, 2020, 3:07 AM
Amit GuptaPosted Nov 18, 2020, 11:44 AM
Ben ThompsonPosted Nov 18, 2020, 11:03 AM
Shane NicholsonPosted Nov 17, 2020, 1:44 PM
Sachin SinghPosted Nov 17, 2020, 11:48 AM