在窗口上加两个控件:em_day1,em_day2
mask属性是"yy-mm-dd"
ls_day1 = trim(em_day1.text)
ls_day2 = trim(em_day2.text)
if len(ls_day1) < 1 or (not isdate('20' + ls_day1)) then setnull(ls_day1)
if len(ls_day2) < 1 or (not isdate('20' + ls_day2)) then setnull(ls_day2)
if isnull(ls_day1) or len(ls_day1)=0 then
else
ls_day1 ='20' + em_day1.text + ' 00:00:00'
end if
if isnull(ls_day2) or len(ls_day2)=0 then
else
ls_day1 ='20' + em_day2.text + ' 00:00:00'
end if