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:
00558664
Vues:
13
I experimented a bit...

adding .0 gives me my desired results...

TempKey = -(datetime() - {1/1/1970 12:00am})+.0
? TempKey
displays -1000973668

Seems a bit strange but it works. Thanks a million!


>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform