Jump to content

How set time in UniDateTimePicker?


Lena
 Share

Recommended Posts

Hi.

How set time in UniDateTimePicker?

void __fastcall TMainForm::UniFormShow(TObject *Sender)
{

 TDateTime dtTime1 = StrToTime(L"00:00:00");
 TDateTime dtTime2 = StrToTime(L"23:59:59");

 UniDateTimePicker1->DateTime.CurrentDate() - 1 + dtTime1;
 UniDateTimePicker2->DateTime.CurrentDate() + dtTime2;

}

It does not work.

Link to comment
Share on other sites

void __fastcall TMainForm::UniFormShow(TObject *Sender)
{

TDateTime dtTime1 = StrToTime(L"00:00:00");
TDateTime dtTime2 = StrToTime(L"23:59:59");

UniDateTimePicker1->DateTime = TDateTime::CurrentDate() - 1 + dtTime1;
UniDateTimePicker2->DateTime= TDateTime::CurrentDate() + dtTime2;

}


You have to assign values to DateTimePicker->DateTime

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...