Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Extract time and compare dates

616075Feb 7 2008 — edited Feb 7 2008
I would like to know if hh:mm:ss have following value : "00:00:00" but I can't extract those values from the date. I'm not interested in dd/mm/yy but they are included in the string I receive.

set serveroutput on;
declare
str varchar2(30);
dat date;
begin
str := '19/01/2008 00:00:00';
dat := to_date(pepe,'HH24:MI:SS'); -- can't do this because mask do not fit with input string
if dat = '00:00:00' then ....
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 6 2008
Added on Feb 7 2008
4 comments
3,431 views