Topic: Database search problem

I have a table with the fields: date and name.
With the SQL query:

form1.Edit1.Text:=  SQLExecute('SELECT NameStoka FROM stoki WHERE (dateadd >= '+form1.DateTimePicker1.sqlDateTime +') and (dateadd <= '+form1.DateTimePicker2.sqlDateTime +')');

I don't get the records from the 1st date of the months

Re: Database search problem

Please attach your project.
Derek.

Re: Database search problem

This is a completely separate production, but it doesn't work here either.

Post's attachments

Attachment icon iban.rar 293.77 kb, 171 downloads since 2022-05-01 

Re: Database search problem

Hi,
You have defined 'dateadd' as 'date' in your databaseschema.
Therefore, in your script, instead of using
'form1.datetimepicker1.sqldatetime'
try using
'form1.datetimepicker1.sqldate'
Derek.

Post's attachments

Attachment icon iban2.zip 336.84 kb, 189 downloads since 2022-05-01