The information in this article applies to:
SUMMARYA number of spreadsheet applications output dates in a "Month Day, Year" format such as "January 1, 1994." This renders the dates useless when appended into a FoxPro database that requires the field be a date type. The following code shows how to convert the string to a character date, which is an accepted format for standard date type conversion. MORE INFORMATION*** MDY2DATE.PRG converts string Month Day, Year to char date
From the Command window, enter the following:
Once the all the date fields have been filled, the database structure must
be modified. From the Database menu, choose Setup. Then select Modify, or
enter the following in the Command window:
Select the character string date field, and change the field type from
Character type to Date type. Save the changes to the file.
By default, only the last two digits of the year will be displayed. To display the full year, use the SET CENTURY ON command. Additional query words: spelled alter
|
|
Last Reviewed: April 26, 1999 © 1999 Microsoft Corporation. All rights reserved. Terms of Use. |