problems with vbscript if statement
- From: tvdbroek@xxxxxxxxxxx
- Date: 25 Jan 2006 13:00:05 -0800
This is the VBScript code that isn't working....
---
dcreated = fileName.DateCreated
ddiff = DateDiff("d", Now, dcreated)
If ddiff < 8 Then
'Blah
End if
---
I create a variable ddiff... this variable contains the nr of days from
the created date until today. When I print the variable ddiff, it
contains the right number.
But when I use it in the If statement (<8) then --- ALL --- the ddiff
values, also the ones that are bigger than 7, pass this statement!! I
checked the contents of the variable ddiff by printing them, and the
are correct. It seems that the If statement is nog working...
What to do?
Regards,
Tom
.
- Prev by Date: Removing a printer
- Next by Date: Re: How to sort a comma delimited text file?
- Previous by thread: Removing a printer
- Next by thread: Re: Bulk Insert
- Index(es):
Relevant Pages
|