Jump to content

How set time in UniDateTimePicker?


Lena

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

Do you really need the seconds?

 

Yes. I need the whole day. The devices send data. It is important not to lose them when SQL query.

I use TUniDateTimePicker in query parameters.

 

 

.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...