Not able to compare a date with sysdate in an .rtf template
727957Oct 14 2009 — edited Oct 14 2009Hi,
Could anyone help me, how to compare a date with sysdate in an .rtf template.
Below is my scenario:
----------------------------
Working on PO Print report (PO Out for Communication).
In one of the field I need the below logic.
if expiration_date < sysdate then 'Expired'
else if line_location_id != '' then 'Hello'
else UNIT_PRICE end if
I am trying the below code:
<?xdofx:if EXPIRATION_DATE < sysdate('DD-MON-YYYY HH24:MI:SS') then 'Expired' else if LINE_LOCATION_ID!='' then 'See Below' else UNIT_PRICE end if?>
Irrespective of expiration_date it is printing 'Expired'.
But I want to print 'See Below' or UNIT_PRICE if expiration_date is higher than sysdate.
I even want to add one more condition if it works. If expiration_date is null then I would like to add one more day to the expiration_date.
EXPIRATION_DATE is coming as DD-MON-YYYY HH24:MI:SS.
I really appreciate if any one helps me.