AnsweredAssumed Answered

Changing table fields from Date to Year only contents

Question asked by gregdc on Feb 6, 2014
Latest reply on Feb 6, 2014 by philmodjunk


Changing table fields from Date to Year only contents


     OK an Elementary Question:  Working In FM13 table has 4 fields defined as Date type, about 1000 records.  The client now wants these 4 fields to be Year only.  Table is used in portal for data entry and 3 reports, so lots of things will change.   

     What is an easy way to change the content of these 1000 records to match the new requirement?   Is there a script that I can write that would

     1. do it in place


     2. do I need to copy the records out to a backup table, change the original table field definitions and then write a script to read through the backup table by Primary Key and rewrite the data in original table using its Primary Key?


     I have never written a script like either one of these so would really appreciate some code examples.  


     Thanks, this forum has always been a great help to me as I get started with FM.