Can you plan a c section?

Can you pick a date to do it or does it have to be an emergency and a last resort during labour?