DateTimeToStr (C++)
Description
This example uses a label and a button on a form. When you click the button, the current date and time is converted to a string and displayed as the caption of the label.
Code
void __fastcall TForm1::Button1Click(TObject *Sender)
{
Label1->Caption = DateTimeToStr(Now());
}
Uses
- System.SysUtils.DateTimeToStr ( fr | de | ja )
- System.SysUtils.Now ( fr | de | ja )