i would like to get date and time of button event. Here is the code that is writing the input from textBox11 into text file when the button 5 is clicked.
Can anyone help me advice how to write the data and time into this text file when the button is click?
....
......
this->dateTimePicker1->Location= System::Drawing::Point(49,112);
this->dateTimePicker1->Margin=System::Windows::Forms::Padding(2);
this->dateTimePicker1->Name=L"dateTimePicker1";
this->dateTimePicker1->Size=System::Drawing::Size(179,20);
this->dateTimePicker1->TabIndex=10;
this->dateTimePicker1->ValueChanges +=gcnew System::EventHand;er(this,&Form1::dateTimePicker1_ValueChange);
..
...
...
private: System::Void button5_Click(System::Object^ sender, System::EventArgs^ e)
{
StreamWriter^ writeToFile=File::AppendText(openFileDialog1->FileName);
writeToFile->WriteLine("{0}",textBox11->Text);
???????????dateTimePicker ?????????
writeToFile->Close();
}