Suman Raj

Suman Raj

  • NA
  • 287
  • 13.4k

I want to get date and insert in to data grid by using those

Jul 2 2018 1:56 AM
string cmd = "updateDateTime";
DateTime d = dateTimePicker2.Value;
DateTime t = dateTimePicker3.Value;
cmd += "\nWeek :=>" + ((int)d.DayOfWeek).ToString("0");
cmd += "\nTime :=>" + t.Hour.ToString("00") + ":" + t.Minute.ToString("00") + ":" + t.Second.ToString("00");
cmd += "\nDate :=>" + d.Day.ToString("00") + ":" + d.Month.ToString("00") + ":" + d.Year.ToString("0000");
MessageBox.Show(cmd);
if (bluetooh.send(cmd))
{
Thread.Sleep(1000);
textbox2.Text += "Date time updated sucessfully : " + bluetooh.recieve();
dataGridView1.Rows.Add("Date & Time", date.Replace("!", ""));//Explain this line and help me further
how i should insert date to datagrid using string value
 

Answers (2)