TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Shane Nicholson
NA
36
1.7k
C# data output format
Nov 17 2020 11:26 AM
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;
Reply
Answers (
11
)
Datagridview controls
How to grab content from webpage source?