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

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -