+ Start a Discussion
grrepITgrrepIT 

Cutsom field data type change withou loosing data

Hi,

I have custom field of type 'Text(15)'. I want to change this field type to 'Date/time'. When we are trying to change the field type , we were getting a message that the data will be lost. Do we have any other way to change this field data type without loosing the data like create another field and save this field to newly created field?

Please advise.

Thanks in advance.

DevAngelDevAngel

Hi grrepIT,

You will need to create a new custom field of DateTime and run an api process to read the text field from each record and cast the text to a date and then update the record placing the date into the new datetime field.

grrepITgrrepIT

Is it possible to this process from front end?

 

Thanks,

 

ScotScot

You could use the sforce Connector to do this pretty quickly....

> Add the new field through the UI
> Do a query (in the connector or a report) to extract the id, old field, and new field
> In Excel, use an expression in the new field cells to calculate the date value
> Use the update cells function in the Connector to update the new fields
> Delete the old field through the UI.

Scot