I'm trying to open a new blank form using formula: @Command([@Compose];"Computer") but it pop up error message as below:
"Field: 'PDateEnd': Incorrect data type for operator or @Function: Time/Date expected"
Inside my form, I have three field to count difference between two date. The field is as below:
PStartDate: Computed for display with @Today formula.
The first field is current date. So it will update day to today everytime document is open.
PDateEnd: Editable with formula @Date(PDateEnd) The second field is date set by user. So it can be edit.
PMonitorWarranty: Computed for display with formula:
@Abs(@Integer((PDateEnd - PStartDate) / (86400)))
I'm try using this but it show another error: "Field: 'PDateEnd': Unable to interpret Time or Date"
Why is there is error on my PDateEnd? Any help much appreciated. Thanks!
The error shows up when your field PDateEnd is empty.
Check in your formula first if PDateEnd is empty and calculate time difference only if it's not:
@If(PDateEnd = ""; ""; @Abs(@Integer((PDateEnd - PStartDate) / (86400))))