Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SCAN Confused?
Message
From
07/06/2001 16:58:53
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
07/06/2001 16:27:50
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00515720
Message ID:
00516660
Views:
13
>>
>>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)) && variants of this line follow
	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.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform