Adding events on weekdays only

Results 1 to 4 of 4

Thread: Adding events on weekdays only

  1. #1

    Default Adding events on weekdays only

    How is it possible to use the DateAdd function to add events that re-occur over a period of time on weekdays only?<BR><BR>Eg.<BR>Start Date 4 April 2003<BR>Finish Date 23 September 2003<BR><BR>Event occurs every weekday during this period, but not weekends<BR><BR>Im using a for next statement which carries out the insertion to the database. This works well. <BR><BR>I use the following to generate my dates as it loops through...<BR><BR>NewDate = DateAdd("d", "whatever value", CDate(request.form("date")))<BR><BR>Is it possible to use a weekday only function in there somewhere?<BR><BR>Thanks in advance,<BR>John

  2. #2
    Join Date
    Dec 1969

    Default RE: Adding events on weekdays only

    Maybe I don&#039;t know the true extent of your situation, but off hand i would say to use VB&#039;s day constants in some fashion<BR><BR>The value is 6, the name is vbSaturday, the meaning is "Saturday"<BR><BR>Hope this helps

  3. #3

    Default RE: Adding events on weekdays only

    Sorry for the delayed response...Im in australia! <BR><BR>Id like to somehow identify both saturday and sunday as invalid days and add my re-occuring events to my calendar on weekdays only.<BR><BR>Any ideas?

  4. #4

    Default RE: Adding events on weekdays only

    Could I do something like this?<BR><BR>If cDate(NewDate) = vbSaturday or vbSunday then<BR>cDate(NewDate) = null<BR><BR>The problem here would be id still get an entry to the database, just with a blank date. Not sure I want to do this...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts