Are you assigning date type column values to any variables before use in the condition? If so please check you use date type variables. If they are string type use the correct converting like = to_char(date_column, ‘YYYY-MM-DD’).
And also check the event side column data type as well.
Event attributes are always strings when you use them.
When you select an attribute to be used in the event you can define what the attribute shall contain:
DATE Date without timestamp
TIME Timestamp without date
DATETIME Date and timestamp
The format of the string for the three different DATE formats are defined in the picture below and you can change it to your preferred format. Observe! This format is for all events.
Good morning,
Thank you for your replies.
We are working with IFS-9 UPD14.
I have the attribute defined as date type in the event.
If I write the following statement in the event:
I get this answer:
You can observe that SYSDATE is right, but “CONFIRM_DATE” is a number, not a date.
I have tried with more date type attributes and with different logical units and tables, and I get always a number as a result.
Best regards,
Amaia
Can you try the code below instead and you should see the value of &NEW:CONFIRM_DATE more clearly, separated from the other value you trace out.
Since all attributes are strings you can’t just use them directly. In my example below I have put ' around it for PLSQL to know that it is a string. You should always handle it as a string.
The issue you are having with it always converting the first value is because the first parameter expected is the LU Name.
This doesn’t technically have to be a LU name, you could name it like so: ‘ExpenseHeaderEvent’
The DATE: is to prevent the error message from displaying a . before the date - For example without DATE: it would read: .19/10/2020
For one hand, I replaced &NEW:CONFIRM_DATE by ‘&NEW:CONFIRM_DATE’ int the Error_sys as Tomas indicated, and it worked.
By the other hand, I wanted to compare CONFIRM_DATE and TRUNC(SYSDATE,’MM’), but date formats are different and the comparision was wrong (Confirm_date = ‘2020-10-13’, Trunc(sysdate,’mm’)=’01-OCT-20’). I had to define date variables to work with similar date formats and be able to compare correctly.