Lena Posted May 28, 2015 Share 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. Link to comment Share on other sites More sharing options...
mehmet07 Posted May 28, 2015 Share Posted May 28, 2015 delphi is also working. Link to comment Share on other sites More sharing options...
tappatappa Posted May 28, 2015 Share 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 Link to comment Share on other sites More sharing options...
Lena Posted May 29, 2015 Author Share 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. Link to comment Share on other sites More sharing options...
tappatappa Posted May 29, 2015 Share 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? Link to comment Share on other sites More sharing options...
Lena Posted May 29, 2015 Author Share 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. . Link to comment Share on other sites More sharing options...
tappatappa Posted May 29, 2015 Share 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. Link to comment Share on other sites More sharing options...
Lena Posted May 29, 2015 Author Share 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now