Nella tua versione funziona, ma hai aggiunto 20 alla data di oggi, il problema è il confronto tra date lì non funziona:
codice:
function convertDate(theDate)
if isDate(theDate) then
theYear = datePart("yyyy",theDate)
theMonth = datePart("m",theDate)
theDay = datePart("d",theDate)
if theMonth < 10 then theMonth = "0" & theMonth
if theDay < 10 then theDay = "0" & theDay
convertDate = theYear & "/" & theMonth & "/" & theDay
end if
end function
...........
Do While NOT objREC.EOF
strDataOggi = convertDate(date())
strDataCons = convertDate(objREC("DataDB"))
strDataDiff = DateDiff("d", strDataOggi, strDataCons)
objREC.MoveNext
Loop
if strDataDiff > 10 then
response.write "stop"
end if
response.end