The conversion of a varchar data type to a datetime data type resulted in an out-of-rane v - VB
Формулировка задачи:
Привет!
Помогите, пожалуйста, новичку.
Куски кода, касающиеся проблемы:
Скриншот с ошибкой во вложении.
Помогите, пожалуйста, новичку.
Куски кода, касающиеся проблемы:
Скриншот с ошибкой во вложении.
Решение задачи: «The conversion of a varchar data type to a datetime data type resulted in an out-of-rane v»
textual
Листинг программы
option explicit
dim CurDate, strCurYear, UpBound, t, z
CurDate = Date()
UpBound = 1000000
REM implicit "conversion"
t = timer()
for z = 1 to UpBound
strCurYear = right( CurDate, 4 )
next
wscript.echo "implicit: "& timer() -t
REM explicit "conversion"
t = timer()
for z = 1 to UpBound
strCurYear = right( CStr(CurDate), 4 )
next
wscript.echo "explicit: "& timer() -t
REM implicit: 2,296875
REM explicit: 2,515625