Lena Posted May 28, 2015 Posted May 28, 2015 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. Quote
tappatappa Posted May 28, 2015 Posted May 28, 2015 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 Quote
Lena Posted May 29, 2015 Author Posted May 29, 2015 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. Quote
tappatappa Posted May 29, 2015 Posted May 29, 2015 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? Quote
Lena Posted May 29, 2015 Author Posted May 29, 2015 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. . Quote
tappatappa Posted May 29, 2015 Posted May 29, 2015 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. Quote
Lena Posted May 29, 2015 Author Posted May 29, 2015 using a TUniDBDateTimePicker The user fills in by yourself parameters client. For seconds I will be use ComboBox. Other people are also faced with this. I found a topic: http://forums.unigui.com/index.php?/topic/5187-tunidatetimepicker-with-seconds/?hl=tunidatetimepicker Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.