Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here. Want to know more about what has changed? Check out the Community News blog.

How to query Hive to do timestamp range search

SOLVED Go to solution

How to query Hive to do timestamp range search

New Contributor

Hive_timestamp2.png

Hive_timestamp.png

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: How to query Hive to do timestamp range search

New Contributor

You need to put single quotes around your timestamps.

 

Example) select * from dev_synchrophasor.si_co where `timestamp` between '2017-03-01 00:00:03.00' and '2017-03-01 00:00:10.0'

 

Hope that helps!

3 REPLIES 3
Highlighted

Re: How to query Hive to do timestamp range search

New Contributor

You need to put single quotes around your timestamps.

 

Example) select * from dev_synchrophasor.si_co where `timestamp` between '2017-03-01 00:00:03.00' and '2017-03-01 00:00:10.0'

 

Hope that helps!

Re: How to query Hive to do timestamp range search

New Contributor

Hive_timestamp3.png

Re: How to query Hive to do timestamp range search

New Contributor
Thanks, Ryan. It works.