sashmorhall
asked on
Date Difference
I have an order date. I need to get all admission dates 90 days before and 90 days
after the order date. The order date is in the orders table and the admission date is
in another table. I am using crystal reports. I tried using datediff but something is off.
Thanks
after the order date. The order date is in the orders table and the admission date is
in another table. I am using crystal reports. I tried using datediff but something is off.
Thanks
ASKER
I was originally using a subreport but I have to create a side by side bar chart that shows the number of admissions before and the number of admission after.
IS the date a parameter to the report?
mlmcc
mlmcc
ASKER
The order date will be a parameter.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I used datediff("d",order date,admission date) in 1 to 90 and
("d", admission date, order date) in 1 to 90 and it worked fine. I think my original problem was the linking. Thank you very much for you help.
("d", admission date, order date) in 1 to 90 and it worked fine. I think my original problem was the linking. Thank you very much for you help.
If you used what you claim, it can't work since one of the differences has to be negative.
datediff("d",order date,admission date) in 1 to 90 and ("d", admission date, order date) in 1 to 90
You could use
ABS(datediff("d",order date,admission date)) in 1 to 90
mlmcc
datediff("d",order date,admission date) in 1 to 90 and ("d", admission date, order date) in 1 to 90
You could use
ABS(datediff("d",order date,admission date)) in 1 to 90
mlmcc
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
Are you using a subreport or is te order date a value provided by the user.
mlmcc