Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simple Coded Date & Time for report comparision validity
Message
From
11/11/2002 09:45:43
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00720958
Message ID:
00720972
Views:
12
This message has been marked as the solution to the initial question of the thread.
>Hi all
>
>Is there any way to code the Date & Time into a short and (alpha-numeric) decoable code? I can put in a suport utility which takes in the code and shows the date & time from it. Also the precision can be in Minutes and 2 digit Years.
>
>The reason for such a code is that there are times when a client will bring in two sets of reports claiming that they do not tally with each other. Malafied or not, but these two reports are generated at different times with a lot of adjustments made to the data inbetween. Then they conviniently have forgotton the chronology of the report printing and claiming that the app messed it up.
>
>I had put run-date on the reports previously but the clients didn't like the idea of the date being in plain view for any and everybody (read Tax dept.) to see (this is the way businesses are done here, can't change the mentality), so with a short and coded date and time printed on the pages in maybe a compressed mode (FPD25) I just might be able to convince them that it is a serial no. and cannot be tampered with and if a claim is made that the app messed the reports, the support person at the site can decode the code and lay false such a claim.

Yeah; I got similar complaints. If the output of two reports doesn't match, or the output of a report with the data on screen, I usually ask them to run the report again.


If you don't want the date to be human-readable, I recommend something like this:

(((((year%100) * 100 + month) * 12 + day) * 31 + hour) * 24 + minutes) * 60 + seconds + MySecretNumber

You can adjust any of the constants to a higher, but not a lower, value. Of course, you can omit seconds if you like. Year%100 is to get the last two digits. MySecretNumber is optional, but it may make the decoding somewhat more difficult (for the person who doesn't know the exact values). You can add additional secret numbers in other places.

HTH, Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform