Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SYS(3) & VARIABLES
Message
 
To
10/07/2001 12:10:16
David Fluker
NGIT - Centers For Disease Control
Decatur, Georgia, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00528678
Message ID:
00529343
Views:
16
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform