Jump to content

Recommended Posts

Posted

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.

Posted
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

Posted

Thank you for your help.

UniDateTimePicker not be suitable to show the the whole day.

This component may not show the exact time: 23:59:59

What advise to replace?

Thanks.

Posted

I have never used TUniDateTimePicker to show seconds! Have you opened a Bug Report?

Sorry but I cannot advise you a good replacement for that. Maybe a DatePicker+ComboBox? Do you really need the seconds?

Posted

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.

 

 

.

Posted

If you use them as query parameters try using a TUniDBDateTimePicker (attached to a VirtualTable or something equivalent) and see if they are affected by the same bug. Anyway, open a Bug Report.

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.

×
×
  • Create New...