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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to create recurring date

Status
Not open for further replies.

ItHurtsWhenIThink

Technical User
Sep 1, 2007
60
US
I can not find any reference on how to create recurring dates. I need to be able to add recurring days. One event every 24 days. I do not want to dump each date into the database. I want to be able to have a start point in my DB and then have my code figure it out from there.

Any ideas?

Mike Diaz...
 
You could get a little loopy. [smile]

Code:
<%	
  Dim TheDate
		
  For TheDate = cDate("01-01-2007") to cDate("01-01-2008") Step 24
		
    Response.Write(TheDate & "<br>")	
  Next
%>



-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Yes it could and thanks for the suggestion.

The web site will host hundereds of users. that code could be problematic.

The application is for a firefighter shift calendar. The shifts are predicatble (recurring) So, we know that if I work today, I will also work on the same day twenty four days from now. The application I am building will hopefully allow users to enter their department work schedule. Then the script will display what shift is working each day on my web calendar (month view). So lets say the shift schedule goes something like (three shifts A,B,C): A B C B C A C A C A C A B C B C B C A C A B A B A B C B C A C A C A B 5 B C

OK, that is a little more than a months worth. In that schedule you will see that the a partricluar shift will reacurr every twenty four days. Not every fire department has the same shift schedule but they do have three shifts. Using the twenty four rule will work with any three platoon shift schedule.

So my project is to allow an administrator to buiod the recurring dates and it will then display the shifts on the agency calendar.


Any other suggestions?

Mike Diaz...
 
Given a starting date and a daily shift pattern, it should be possible to write a function that returns a monthly shift calendar for any given month of any given year.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top