How to find calculate the number of days between two dates business central.
NoOfDays:=Abs(Order-Due);
Here NOfDays is a variable(Integer),Abs(Absolute) returns positive numeric value.
learn.microsoft.com/.../system-abs-method
Hope this Helps
Thank you
Looks like your date format is MM/DD/YYYY
Change it to
Order- 02/04/23, Due - 02/05/23 and try
try due - order
NoOfDays:=ABS(Due - Order);
Try this One
Result := Order - Due; Isn't working.
Isn't working.
Order- 04/02/23, Due - 05/02/23, Result Count - 30 <- its wrong, We have count 1
You can use CalcDate function to calculate Dates
Or else
Result := Order - Due;
Result field must be integer
Thank you
Isn't NoOfDays := Due - Order; work?
NoOfDays is integer datatype
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,219 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156