Hi Beni,
that would be possible with a minor modification of the existing script and txt file from the original kb article.
First you would have to extend the dates in the txt file. My following modification would except single date as also date/time ranges. E.g. something like this:
01.11.2007
24.12.2007 08:00;24.12.2007 14:00
25.12.2007;26.12.2007
31.12.2007 08:00;31.12.2007 14:00
Please note, that start end end date of a range are separated by a semicolon.
You can enter single dates per line, date ranges without any time or also date ranges including times.
Now you need to modify the existing script a little bit:
---------------
Dim bRange, aRange, vStart, vEnd
...
do while (not (file.AtEndOfStream)) and (not bReturn)
sLine = file.ReadLine
bRange = False
aRange = Split(sLine, ";")
if IsDate(aRange(0)) then
vStart = CDate(aRange(0))
if UBound(aRange) > 0 then
if IsDate(aRange(1)) then
bRange = True
vStart = CDate(aRange(1))
end if
end if
if not bRange then
if (DateDiff("d", vDate, vStart) = 0) then bReturn = True
else
if (DateDiff("n", vStart, vDate) > 0) and _
(DateDiff("n", vEnd, vDate) < 0) then bReturn = True
end if
end if
loop
---------------
Beni, I haven't tested this, but it should work. Once you have created a running ecr script from it I would like to ask you to upload it here so it will available for all other users as well.