Suman Raj

Suman Raj

  • NA
  • 287
  • 13.5k

I just want to update time using this code anyone help me

Jun 29 2018 1:30 AM
private void BtnUpdateDate_Click(object sender, EventArgs e)
{
string cmd = "updateDateTime";
DateTime d = dateTimePicker2.Value;
DateTime t = dateTimePicker3.Value;
cmd += ((int)d.DayOfWeek).ToString("0");
cmd += t.Hour.ToString("00") + t.Minute.ToString("00") + t.Second.ToString("00");
cmd += d.Day.ToString("00") + d.Month.ToString("00") + d.Year.ToString("0000") + "!";
if (bluetooh.send(cmd))
{
Thread.Sleep(1000);
ComboRunwayOffline.Text += "Date time updated sucessfully : " + bluetooh.recieve();
}
}

Answers (3)