Just a minor change to the code. For the days before the event it shows in the DOS box
during logon, when the day arrives it POPS UP a MessageBox for more attention. Then when
event is passed it goes back to the DOS box until you disable it in the script.

Now that the code is working and readily available, I may have to use it for something myself.






break on
$Date="2003/06/20"
$EventDay=(serialdate($Date) - serialdate(@date))

SELECT
CASE
$EventDay >0
? "There are " + $EventDay + " days till The Annual Corporate Conference this year on Sept. 22nd"
CASE
$EventDay <0
? "The Annual Corporate Conference passed by " + $EventDay + " day/s ago."
CASE
$EventDay =0
$EM=Messagebox('The Annual Corporate Conference is TODAY'+@crlf+@crlf+'
'
+@date, 'Corporate Event', 64, 10)
ENDSELECT

function serialdate($ExpD)
dim $z,$h,$a,$b,$c,$y,$m,$d
if instr($ExpD,'/')
$ExpD=split($ExpD,'/')
$y=val($ExpD[0])
$m=val($ExpD[1])
$d=val($ExpD[2])
if $m<3
$m=$m+12
$y=$y-1
endif
$SerialDate=$d+(153*$m-457)/5+365*$y+$y/4-$y/100+$y/400-306
else
$z=0+$ExpD+306
$h=100*$z-25
$a=$h/3652425
$b=$a-$a/4
$y=(100*$b+$h)/36525
$c=$b+$z-365*$y-$y/4
$m=(5*$c+456)/153
$d=$c-(153*$m-457)/5
if $m>12
$y=$y+1
$m=$m-12
endif
$SerialDate=right('0000'+$y,4)+'/'+right('00'+$m,2)+'/'+right('00'+$d,2)
endif
endfunction