>>
>>It's the milliseconds which are not displayed, but are there
>
>Yes...just pointing out +1 adds a second...
>
>... but then, the way this case was built, there should always be 0 milliseconds, or... well, if XX century had only 99 years, why should each and every second have exactly 1000 milliseconds?
>>
>
>*grin* If we could only figure out which century we lost that year in :)
The century is intangible, sort of, but I've found a tangible way to prove that VFP doesn't treat all seconds equally; some of them get more or less milliseconds, i.e. the routine which adds the seconds to a datetime is not necessarily giving it the proper number of milliseconds. Run this:
close data all
set safe off
create data test
create table milli (pkey t primary key, ndiff Y)
ldCount = {^2001-01-01 12:00:00 AM}
for j=1 to 100000
ldCount=ctot(ttoc(ldCount+1.000))
insert into milli (pkey) value (ldCount)
replace ndiff with pkey-ctot(ttoc(pkey))
endfor
It will not break, but it will give you a millisecond here and there.
With ldCount=ldCount+1, you always get about up to 499 milliseconds, and the moment it errors out is when it reaches the 500 - at 501, it breaks the index.