Closed ScottB-Ronco closed 8 months ago
This is right Rec."Closed at Date" - Rec."Posting Date"
but the type of the calculated field has to be integer (a number of dates is not a date, is an integer).
OK so I did that, I set the field type to integer and I used the expression Rec."Closed at Date" - Rec."Posting Date" however I still get the error Syntax error: Syntax error: (Line 1): Type mismatch Integer vs Date when I go to verify the expression.
Ignore that... That might be the Simple Object Designer not realizing date-date=integer - I'll check that...
Try publishing :)
So I published it and it worked as expected.
Seems on the next SOD release you will need to update the expression validator to take the date-date=integer into account as a valid expression.
I'll be closing this issue now.
Thank you again for your quick response.
Is it possible with the calculated field functionality to create a calculated field that counts days between two date fields?
What we what to do is have a field called Payment Days on the Customer Ledger Entries screen that takes the Closed at Date - Posting Date and give us back total number of days between the two date fields.
I've the expression Rec."Closed at Date" - Rec."Posting Date" and also CalcDate(Rec."Closed at Date",Rec."Posting Date") but whenever I verify the expression I keep getting an error of "Type mismatch (Decimal vs. Date)".
I did make the field type as Decimal so I am assuming this is the reason for type mismatch error.
With that how would I got about created the required field in regards to the field type being used and getting the days between two date fields.