If you go about this without taking out the fish, you are going to give your self a lot of headaches.
Also, when sand is put into a fish tank, it makes the water very murky in the beginning, and this would not be suitable for fish.
It can take hours to days for the water to clear.
You are best to take the fish out and out them into another tank or bucket, and then put the filter, heater and lights on the temporary tank.
Then you can either scoop out the gravel and dump the sand in (Not recommended), or empty the tank out completely, and then switch over the substrate.
-FHM