Line 147 is: IF LEFT(DateToStr(strForumTimeAdjust),8) - (LEFT(T_DATE,8)+1) = 0 then
Seems T_DATE or strForumTimeAdjust might be an empty or a null string.
I don't have time to help you debug as I gotta run. I'll help you later if someone else just chime in here.