%
Function NextDate(dayin1)
dayin1 = ucase(dayin1)
dayin = dayin1
If Dayin="SUNDAY" Then Dayin2=1
If Dayin="MONDAY" Then Dayin2=2
If Dayin="TUESDAY" Then Dayin2=3
If Dayin="WEDNESDAY" Then Dayin2=4
If Dayin="THURSDAY" Then Dayin2=5
If Dayin="FRIDAY" Then Dayin2=6
If Dayin="SATURDAY" Then Dayin2=7
night1 = dayin2
dif = night1 - weekday(date)
dif3 = dif
if dif < 0 then dif = dif + 7
if dif = 0 then dif2 = 0 else dif2 = 1
select case dif ' if its tonite, then display a different message
case 0
when = "Tonight, "
whenpre = "("
whenpost = ")"
case 1
when = "Tomorrow, "
whenpre = "("
whenpost = ")"
case 5, 6
when = "Next Week "
case 7
when = "Next Week "
case else
when = "This "
end select
iF DIF = 0 and time > Cdate("21:01:00") THEN WHEN="Next Week, "
nextclubdate = dateserial(year(date), month(date), day(date) + dif3)
out1 = when & WEEKDAYNAME(WEEKday(NEXTCLUBDATE)) & ", " & LEFT(monthname(MONTH(nextclubdate)),3) & " " & day(nextclubdate)
NEXTDATE = OUT1
End Function
%>