Notifications
Announcements
No record found.
How to find calculate the number of days between two dates business central.
Isn't NoOfDays := Due - Order; work?
NoOfDays is integer datatype
You can use CalcDate function to calculate Dates
Or else
Result := Order - Due;
Result field must be integer
Thank you
Isn't working.
Order- 04/02/23, Due - 05/02/23, Result Count - 30 <- its wrong, We have count 1
Result := Order - Due; Isn't working.
NoOfDays:=ABS(Due - Order);
Try this One
try due - order
Looks like your date format is MM/DD/YYYY
Change it to
Order- 02/04/23, Due - 02/05/23 and try
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
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
OussamaSabbouh 3,229
Jainam M. Kothari 1,867 Super User 2025 Season 2
YUN ZHU 1,153 Super User 2025 Season 2