Joined: 29 Mar 2011
Online Status: Offline
Posts: 3
Topic: Counting Days in a table between 2 parameter dates Posted: 29 Mar 2011 at 6:12am
I've been trying to figure this out for a few days now, and have had no luck.
We have a Table here at work called "Working_Day". within it, is only 1 field that lists all the working days that we operate. It excludes weekends, and holidays. (has been pre-populated until sometime in 2020, all the way back from 1990)
What I need to do is, count the number of days within the table using a subreport between two given parameter dates.
Example:
Date range of March 1st 2006 - April 15th 2006.
I'd have a parameter for the start date and end date (StartDate, EndDate), and those parameters pass into the subreport.
Now, in the database, i need it to count each date within the table that exists between those two dates. I know using this example, the result should be 32. But i just cant figure out the logic to make this work.
I'm a bit new to Crystal Reports, and this has been the hardest thing to figure out so far. Google hasn't been a great help either.
Any suggestions are much appreciated, and thank you.
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Posted: 29 Mar 2011 at 6:31am
when you say you have one field with all the days do you mean you have one row per day or is it one gianty blob field with all the dates listed withj comma seperators or something similar?
assuming it is one row per date what is the field type and or field format?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum