Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select Formula Help

Status
Not open for further replies.

Darrick

Technical User
Aug 28, 2001
77
US
{MOSAIX_CALL_LIST.DOWNLOAD_DATE} = {?Pm-MOSAIX_CALL_LIST.DTE}

In my Select Expert, I have this formula in one of my subreports. This works fine, however using this formula, I'm missing all of my infromation that falls on a Sunday. The reason being is that if a Sunday is within the range that the user selects through this parameter field {?Pm-MOSAIX_CALL_LIST.DTE} Then I actually need the {MOSAIX_CALL_LIST.DOWNLOAD_DATE} to subtract 1 day using Saturday's totals. I've tried the DateDiff function, but I still can't get it to work properly. Any help would be a great help to me.

Thanks in advance,

Darrick
darrick3@yahoo.com
 
Are you trying to select records equal to a certain date, or within a date range? You state that the user selects a date range with the parameter, but your record selection formula which you say is working contradicts this.
 
Yes, I am already asking the user to select a date range. The problem arises when one of the days is a Sunday. Ie. the user selects a date range that includes a Sunday. The reason that this is a problem, is because I'm searching for data based off of Saturday and Sunday to make up the Sunday data. There for my logic doesn't work. I need to figure a way to pull the Saturday information and add it to Sundays figures to make it work right, and I'm not sure how to do this.

Darrick
darrick3@yahoo.com
 
It seems to me that this can only be a problem if the first date of the range is a Sunday, so
//check to see if first date is a Sunday
If DayOfWeek(Minimum({?WeekRange})) = 1 then
{Download Date} in DateAdd('d',-1,Minimum({?DateRange})) to Maximum({?WeekRange})
Else
{Download Date} in {?DateRange}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top