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.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
OussamaSabbouh 743 Super User 2026 Season 2
YUN ZHU 546 Super User 2026 Season 2
AndrewThomas81 332 Super User 2026 Season 2