Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Make Integer from key fields
Message
 
 
À
12/12/2007 15:55:01
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01275316
Message ID:
01275324
Vues:
7
>>I know, use NextID table and all that, but let's say, for the sake of argument that I want to create a unique integer from a datetime value and an already existing integer. How can I create the final unique integer?
>
>You can subtract the given datetime minus a specific datetime, such as datetime(2000, 1, 1, 0, 0, 0). This will give you the difference in seconds. From there, you can add another integer.
>
>But as to ensuring uniqueness, that will be rather tricky. Perhaps a (VFP) integer is simply too small for your requirements.

Great minds <g> I was thinking exactly that, but if your datetime field is not unique, how would you get unique values?
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform