How to resolve missing right parenthesis error?

Hello Experts,
I am running an SQL query connecting to Oracle DB which runs fine until I include the below where clause:

where c.duration between to_date(:Start_Time,'dd/mm/yyyy hh24:mi:ss') and to_date(:End_Time,'dd/mm/yyyy hh24:mi:ss')

On running the query in DBeaver, I am asked Start and End time values. I enter 13/02/2018 00:00:00 and 13/02/2018 00:59:59. I get the error

SQL Error [907] [42000]:
ORA-00907: missing right parenthesis
ORA-00907: missing right parenthesis
 ORA-00907: missing right parenthesis

I would not be able to paste the full SQL query. So, please let me know if there are any guesses about the possible causes for this error.
Who is Participating?

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

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.

Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
You do not have a where clause at all before adding above?
Geert GOracle dbaCommented:
it might be a different line than the one you think

execute the query in sqlplus and you should get the line where the error occurs
and then add a parenthesis

some editors, like Toad can highlight the parenthesis
that helps
slightwv (䄆 Netminder) Commented:
I'm not familiar with DBeaver but as long as it passes in the variables as strings there is nothing wrong with the syntax.

Using sqlplus:
SQL> select to_date('13/02/2018 00:00:00','dd/mm/yyyy hh24:mi:ss'), 
       to_date('13/02/2018 00:59:59','dd/mm/yyyy hh24:mi:ss') from dual;
02/13/2018 00:00:00 02/13/2018 00:59:59

Open in new window

I agree with the above suggestion:  Try the entire query in sqlplus or other simple tool.  Then you know where the error is being generated.
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

awking00Information Technology SpecialistCommented:
When you are asked for the Start and End time values, are you entering them in quotes (i.e. '13/02/2018 00:00:00' and '13/02/2018 00:59:59')?

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
Gerwin Jansen, EE MVETopic Advisor Commented:
To add to the 'editors' suggestion - put your sql in notepad++ and save it as somefile.sql - sql syntax is then applied.
sukhoi35Author Commented:
Thank you experts. In the Bind Parameters window in DBeaver, I missed including quotes assuming the tool might insert by itself.
Geert GOracle dbaCommented:
another free tool tackling the myth that you can write code to work on all databases
... well all popular databases :)

amazing how many bugs get fixed with this thing every 2 weeks
looks like it's still in beta
what better way to let the whole world test and give feedback ?
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
Query Syntax

From novice to tech pro — start learning today.