How to convert time format from 12 hour to 24 hour and vice versa in Excel?

How to convert time format from 12 hour to 24 hour and vice versa in Excel?