That's really cool!! Well...depending on your frame of reference, it may not be. I would guess this has something to do with internal mechanism of collection class. The Enum interface may only deal with datetime as this is supported under COM and simple Date is not.
You should report this at
http://support.microsoft.com/default.aspx?scid=/Support/vfoxpro/report/report.asp (link courtesy of David Frankenbach and others).
>When using a for each iteration with a collection, Date-type values get changed to Time-type as shown in the example below !!!
>
>LOCAL loColl, oColl, lnI
>STORE 0 TO lnI
>STORE null TO oColl, loColl
>
>loColl = NEWOBJECT("Collection")
>
>FOR lnI = 1 TO 10
> loColl.Add(DATE()-lnI)
>ENDFOR
>
>FOR EACH oColl IN loColl
> ? VARTYPE(oColl) &&& == Time Type !!!
>ENDFOR
>
>FOR lnI = 1 TO 10
> ? VARTYPE(loColl.item[lni]) &&& == Date Type which is correct !!!
>ENDFOR
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao