Thanks. Now a question

How do I work out if $correct (date certificate expires) is before end of the year ($expdate). The $correct > $expdate seem to recognise it as a number rather then if one date is before the other?

? "Cert expires: " + $correct
? "End of the year date: " + $expdate

if $correct > $expdate
Open( 3, $server, 5)
WriteLine (3, "@date @time -- Userid: " + @userid + " - Comp name: " + @wksta + " - Cert expires: " + $correct + @CRLF)
Close(3)
endif

Shows:
Cert expires: 17/07/2007
End of the year date: 31/12/2007