To restructure a table and change the type of a field from Alphanumeric to Date, the data in the alphanumeric field must be in the format MM/DD/YY, and the size of the field must be 8 characters.  If the data in the alphanumeric field is in a format other than MM/DD/YY, then the data needs to corrected.  One technique for accomplishing this task is to use a scan loop in a script. The following ObjectPAL script illustrates how to convert data in the format MMDDYY to the format MM/DD/YY.  In order for the script to work correctly, the length of the text must be six characters, and the month, day, and year data must each contain 2 characters. Before making global changes to your table, such as the one described in this document, it is a good idea to first make a backup copy. Creating the Script NOTE: In the ObjectPAL code example shown below, the semicolon ";" indicates that a comment follows.  Comments are ignored and are not required. Choose File | New | Script.  Your script should utimately resemble the following: var tc        TCursor tv        TableView dstr      String endVar if not tc.open("TBLNAME") then   ; Change TBLNAME to the                                                             ; ;   name of your table. ; Enclose it in quotes errorShow("Could not open TCursor") return endif tc.edit() scan tc:                         ; Make sure to include the ;   colon. dstr = tc."FLDNAME"         ; Change FLDNAME to the ;   name of your field in ;   the table.  Enclose your ;   field name in quotes. tc."FLDNAME" = dstr.subStr(1,2) + "/" + dstr.subStr(3,2) + "/" + dstr.subStr(5,2) endScan tc.close() tv.open("TBLNAME") ; Open table in tableview Check the Syntax After you have typed in the script, choose Language | Check Syntax.  The compiler examines the code and identifies any syntax errors in the method.  If the compiler does not encounter any errors, it will display the message "No Syntax Errors" on the status bar.  Otherwise, it will display a brief description of the error and will position the cursor at the first error. Before the script can be run, you will need to correct the code and check the syntax until there are no remaining errors. When there are no syntax errors: 1.  Choose File | Save from the Desktop, type in a filename in the edit box, then choose OK. 2.  To run the script, press [F8]. Once you have run the script, you can close the table and restructure the alphanumeric field to a field of Date type by choosing File | Utilities | Restructure. For additional information on ObjectPAL, refer to the ObjectPAL Reference manual, the ObjectPAL Developer's Guide or the Guide to ObjectPAL, or On-line Help.  For information on restructuring tables, refer to Chapter 9 of the User's Guide. DISCLAIMER: You have the right to use this technical information subject to the terms of the No-Nonsense License Statement that you received with the Borland product to which this information pertains. 