Function SQLDateTimetoDbl(tmpDateTime as string) As double
dim tmpResult as double
dim tmpSQLDateTime as string
dim tmpYear as string
dim tmpMonth as string
dim tmpDay as string
dim tmpTime as string
dim d as new date
if len(tmpdatetime) =17 then
tmpyear=left(str(d.year),2)+left(tmpdatetime,2)
tmpmonth=mid(tmpDateTime,4,2)
tmpday=mid(tmpdatetime,7,2)
tmpTime=right(tmpdatetime,8)
tmpSQLDateTime=tmpyear +"-"+tmpmonth +"-" +tmpday +" " + tmptime
d.SQLDateTime=tmpsqldatetime
tmpResult=datetodbl(d)
else
d=new date
tmpresult=datetodbl(d)
end if
return tmpresult
End Function