PLSQL Developer: Proper syntax for an IF statement
Posted on 2009-05-07
This is probably very simple but it's been driving me crazy tring to find a solution. I want to write an IF statement that would look at a date field, and based on the date, would either return a value of "0" or perform a date difference function.
The logic would follow:
IF field_date >= today's date THEN '0'
ELSEIF field_date < today's date THEN today's date - field_date
END IF AS "LOS"
Also, if my field_date is formatted as text, what do I need to do to use it in a caculation function?