Gnome panel displays the time with 24hrs format but I want to change it to am/pm.
Go to System Settings (from the aggregate menu) and select Date & Time. Use the drop down menu on Time Format to select AM/PM:
or fire up
dconf-editor, go to
org/gnome/desktop/interface/clock-format and turn off
Use default value then set
Custom value to
Via terminal, run
gsettings set org.gnome.desktop.interface clock-format 12h
Further customization of the date/time format can be done via
gnome-shell extensions, see Daniel's answer here.
November 2018, I was about to use your still-an-answer commandline method, dconf-editor, because Date and Time are not in Settings System now. I looked around a little more, and found Date and Time in Details. "Details" is burying the Date and Time format deuce in the details, IMHO. I had given up, until you threw me the bait that got me moving and looking for the setting again.
I checked out dconf-editor. It wasn't here.
sudo apt-get install dconf-editor then: org, gnome, desktop, interface, clock format: click on "12 hour" or "24 hour", pick from drop down list of two choices, 12 hour and 24 hour.
dconf-editor did add something. It notified that the re-read for menus in system still needed to be made, though I had made a change before that in Settings.Details.DateAndTime.