> I really need an example of code here. I learn best that way.
This is untested, so it may need modification before it works. Use at your
own risk <g>.
Description:
1) Returns the dates of the next Saturday and Sunday by finding the date of
the next Saturday and then adding one day to it.
2) If today is a Saturday then the return values are for the NEXT weekend
<!--- get the current day of the week --->
<CFSET intThisDay = DayOfWeek(Now())>
<!--- figure out the offset to next Saturday (day=7) --->
<CFIF intThisDay EQ 7>
<!--- today is Sat, get next Sat --->
<CFSET intOffset = 7>
<CFELSE>
<CFSET intOffset = 7 - intThisDay>
</CFIF>
<!--- get next Saturday's date --->
<CFSET datNextSat = DateAdd("D", intOffset, Now())>
<!--- get the following Sunday --->
<CFSET datNextSun = DateAdd("D", 1, datNextSat)>
This code should automatically deal with the situation where Saturday and
Sunday fall in different months.
Regards,
Seth Petry-Johnson
Argo Enterprise and Associates
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.