Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What controls if scientific notation is used?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00557366
Message ID:
00558615
Vues:
15
This message has been marked as the solution to the initial question of the thread.
Hi!

Well, date/time value in VFP is really a floating-point value on the low level, where one day equals 1.0000 Its no wonder it is displayed that way. Try to convert it to the numeric value before assignment to the variable by adding 00000000000.000000000 to it.

HTH.

>I installed sp3 at home and now the behavior is like the work machine. One
>thing that troubles me though...
>
>TempKey = -(datetime() - {1/1/1970 12:00am})
>? TempKey
>displays -1.0009E+9
>
>
>? -(datetime() - {1/1/1970 12:00am})
>displays 1000939230 (your value will vary with datetime() of course)
>
>
>Any idea on what's going on now?
>
>
>>Hi!
>>
>>Well, while I was not able to fugure it out in a short tests, here are some ideas.
>>Just find what is deifference between these 2 computers. What version of VFP used?
>>Open Options dialog box, hold down the Ctlr, Alt and Shift keys and press Ok button - this will put into the command window all settings list. Write this into the text file, do the same at another computer and then compare settings. Take a look also to the difference in the regianal settings in Windows, but I do not think it can help.
>>
>>>Using vfp5...
>>>
>>>I have a formula which gives me a temporary unique key...
>>>
>>>TempKey = -(datetime() - {1/1/1970 12:00am})
>>>
>>>In the COMMAND WINDOW...
>>>With my home computer, on the results are displayed
>>>in scientific notation.
>>>
>>>? -({9/10/2001 12:00am} - {1/1/1970 12:00am})
>>>displays -1.00008E+9
>>>
>>>On my machine at work, the full result is displayed.
>>>
>>>? -({9/10/2001 12:00am} - {1/1/1970 12:00am})
>>>displays -1000080000
>>>
>>>I cannot find a SETting that controls this behavior.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform