How to copy the data from one field to another field ?

Raghav - that snippet will work,  but I’d look at the action framework released in Summer14.  You can do this with no code.