.EXAMPLE.....: 18 Determine if parm %1 contains a valid date .CATEGORY....: examples .DISCUSSION..: Note that we throw away the FDATE output by redirecting it to NUL. All
we really want here is the errorlevel, which tells us whether or not the
string in %1 is a valid year.
.CODE........:
Fdate /Fv /Imm-dd-ccyy /A%1 >nul
if errorlevel 1 echo Parm 1 was not a valid date: %1
if errorlevel 1 goto endit
::
:: Put the body of your batch file here.
::
:endit