Topic: Hot to get date from table or grid and store it in datetimepicker

Hello community,

Hot to get date from table or grid  and store it in datetimepicker

Post's attachments

Attachment icon test date.zip 336.46 kb, 388 downloads since 2017-05-10 

Re: Hot to get date from table or grid and store it in datetimepicker

The function is SQLDateTimeToDateTime (). Place as part of combobox onChange event.


procedure Form1_ComboBox1_OnChange (Sender: string);
begin
    Form1.DateTimePicker1.DateTime := SQLDateTimeToDateTime (sqlexecute('select _date from date where item =' + '''' + form1.ComboBox1.Text + ''''));
end;

Re: Hot to get date from table or grid and store it in datetimepicker

thank you @ehwagner smile