I'm assuming that there you are looking for the number of days between orders placed by the same customer, otherwise the answer is likely 0 since they probably have lots of orders daily.
To do this, you need to set up a report that groups by customer and sorts by date. Next check out Crystal Reports help for info on the "DateDiff" function and "Running Totals." In particular see the section on "Creating running totals using a formula." I think you'll need to set up multiple running total variables to do this. Sorry I don't have more time to explain this but I think this should help get you started.
Another approach is to take the difference between the first order and last order in the list, and then divide this by the number of orders. The result should be the average time between orders. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
I feel like an idiot. I'm trying to develope algorithms for this and all I need is the # of days and a count. Sometimes things are much easier than they seem.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.