Stougaards
Technical User
Hey There.
I have a VB script which reading AV signatur date information from registry and compare the day with today,
and gives the difference in days, but when reading this 2011/11/17 from a registry key im getting Microsoft VBScript runtime error:
Type mismatch: 'CDATE'
This is the definition in the VB script.
oYear = Left(oDate,4)
oMonth = Mid(oDate,5,2)
oDay = Right(oDate,2)
oNDate = CDATE(oYear &"/"& oMonth &"/"& oDay)
If I remove the / from 2011/11/17 in registry, it works fine.
What am I doing wrong ?
I can post more of the script if requested. Don't know if this is allowed
Thanks.
Stougaards (newbee to tek-tips)
I have a VB script which reading AV signatur date information from registry and compare the day with today,
and gives the difference in days, but when reading this 2011/11/17 from a registry key im getting Microsoft VBScript runtime error:
Type mismatch: 'CDATE'
This is the definition in the VB script.
oYear = Left(oDate,4)
oMonth = Mid(oDate,5,2)
oDay = Right(oDate,2)
oNDate = CDATE(oYear &"/"& oMonth &"/"& oDay)
If I remove the / from 2011/11/17 in registry, it works fine.
What am I doing wrong ?
I can post more of the script if requested. Don't know if this is allowed
Thanks.
Stougaards (newbee to tek-tips)