select data between two dates and two times

Hello,
I want to select data from table paradox from (Date1,Time1) to (Date2,Time2) for example from 01/02/2018 time:22:00:00 to 14/02/2018 time 09:00:00 i'm using delphi 7
Toutou la bellaAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ferruccio AccalaiSenior developer, analyst and customer assistance Commented:
A little more inputs about the table structure and how you want to select datas (by table filter or query sql) could give more info on how to help.
Anyway use something like "select mydata from table where Data between Data1 and Data2 and Time between Time1 and Time2"
0
Geert GOracle dbaCommented:
or with parameters ...

query1.sql.text := 'select mydata from table where Data >= :date1 and data <= :date2';
query1.ParamByName('Date1').asDateTime := EncodeDate(2018,2,1) + EncodeTime(22,0,0,0);
query1.ParamByName('Date2').asDateTime := EncodeDate(2018,2,14) + EncodeTime(9,0,0,0);
query1.Open;

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Toutou la bellaAuthor Commented:
Thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.