How to compare date in string with sysdate in Oracle? -
i new oracle , still used sql server.
i not understand on why command below return '1' when sysdate today 29-apr-15 before 30-apr-15
it should return 0. not understand why returns 1.
any ideas? =)
select case when sysdate > to_date('30-apr-15','dd-mon-yyyy') '1' else '0' end dual
you're missing century date
select case when sysdate > to_date('30-apr-2015','dd-mon-yyyy') '1' else '0' end dual
Comments
Post a Comment