Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Make Integer from key fields
Message
 
 
To
12/12/2007 15:55:01
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01275316
Message ID:
01275324
Views:
8
>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform