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
Aditya B
NA
6
2.8k
Change DATE FORMAT for selected columns in datagridvew
Jan 25 2016 5:34 AM
Hi,
I have a data displaying in DataGridView. Among those few columns are having DATE columns where i need to change the format from MM/DD/YYYY to DD/MM/YYYY and DD/MM/YYYY to MM/DD/YYYY .
I have created a button in FORM1. After clicking FORM1 (button), Another form opens where i have to select the column from the dropdown and click on OK. Form2 should close and Date format for selected should change in FORM1.
Please help me on this. Below is the code:
private void button3_Click(object sender, EventArgs e)
{
Date_Format df = new Date_Format();
df.cmbColumns.DataSource = cmbList;
df.ShowDialog();
string iString = df.cmbColumns.SelectedValue.ToString();
System.Globalization.CultureInfo.GetCultureInfo("en-GB");
DateTime oDate = DateTime.ParseExact(iString, "dd/MM/yyyy hh:mm:ss", System.Globalization.CultureInfo.CurrentCulture);//
MessageBox.Show(oDate.ToString());
}
Reply
Answers (
1
)
how to disable save as button in excel plugin?
update my .dmp database by executenonquery but not worked.