Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to change a single character to a year?
Message
From
17/11/2002 22:27:18
 
 
To
17/11/2002 22:19:16
Henry Ravichander
RC Management Systems Inc.
Saskatchewan, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00723697
Message ID:
00723715
Views:
13
Hi, Henry.

>Thank you Martin. The above works, but is based on the assumption that the 1 digit year is from this century.

As Sergey pointed out, there is no way of telling the exact year if expressed with a single digit.

>Downside, it could be anywhere say for the last 30 years. Would the "Modified" column in Windows Explorer be useful in telling us of the exact year? If so, how doI capture that information?

Do you mean taking the date of the data file to determine the corresponding decade? I wouldn't consider that to be any assurance, but if you want...

You can get the file date using aDir()
lnDir = aDir( laDir, lcYourFile )

if lnDir = 1
   ? laDir[1, 3]
endif
What kind of file are you working with? I found many times two-digit years, but never single digits.

Good luck,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform