Apply $stddate to user input dates

To check a user-input date against $stddate, you need to use the $date function on the user date.
input db;prompt="Enter the start date yymmdd: "
input de;prompt="Enter the end date yymmdd: "
setvar dbyy str('!db',  1,2 )
setvar dbmm str('!db',  3,2 )
setvar dbdd str('!db',  5,2 )
setvar deyy str('!de',  7,2 )
setvar demm str('!de',  9,2 )
setvar dedd str('!de', 11,2 )
echo if $stddate(database-date) !>= $date(!dbyy/!dbmm/!dbdd) and &
        $stddate(database-date) !<= $date(!deyy/!demm/!dedd) >chkdate

run suprtool
base mybase
get  mydset
use  chkdate
ext  key-value, database-date
out  result
xeq	
[Dave Lo]

....Back to the Suprtool Q&A Page