PDA

View Full Version : Timestamp query - Newbie


donaldt
01-30-02, 07:48
I am trying to query a timestamp field by date, can anyone help with some sample script pls.

Thanks in advance

alligatorsql.com
01-30-02, 10:53
Hello,

perhaps that is what you need:

select * from sys.all_objects
where to_date(timestamp, 'yyyy-mm-dd hh24:mi:ss') = date_field

or

convert both to character via TO_CHAR.

But you lose the index when you do it in this way ...
Hope this helps ...

Greetings
Manfred Peter
(Alligator Company)
http://www.alligatorsql.com