Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SYS(3) & VARIABLES
Message
 
À
10/07/2001 12:10:16
David Fluker
NGIT - Centers For Disease Control
Decatur, Georgie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00528678
Message ID:
00529343
Vues:
18
>A word of caution -
>Yes, sys(2015) always starts with a character, but SUBSTR(SYS(2015), 3, 10) does not. It will generate valid file names, but it can generate invalid eight character variable, field, or table aliases. If you want an eight character unique name use "_" + SUBSTR(SYS(2015), 4, 10) instead.


One warning, sys(2015) returns a string in the following format:

_dddpppppp where ddd represents the day and pppppp part of the day.
So if you only use the "pppppp" part, the string is only unique for 24 hours because when you would issue the same command exactly 24 hours later, you could get the same string back.
I've created routines to convert sys(2015) to datatime (and milliseconds) and back some time ago and you can find them in the download section (File ID = #1223)
In there I've commented the way a sys(2015) is composed.

hth,
Frank Camp
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform