Forum Moderators: open

Message Too Old, No Replies

SQL for Calendar

yie! adding multi day events

         

ratebeer

2:19 am on Feb 12, 2005 (gmt 0)

10+ Year Member



I'm updating our calendar to accept multi day events and I'm finding I need to completely rewrite the display code.

I need some kind of stored procedure that loops through the days of the month and checks to see if an event's date and end date are on or "cup" that date.

Any help would be much appreciated!

joe

mattglet

5:26 am on Feb 12, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



pseudo:

sql = "select start_date, end_date, name from yourtable where start_date >= '1/1/1900' and end_date < '1/1/2000'"
set rs = conn.execute(sql)

do while not rs.eof
response.write rs("name")
rs.movenext
loop

rs.close()
set rs = nothing
conn.close()
set conn = nothing

That should give you the right idea.