RTC ds1307 in 24 hour mode

I am using a ds1307 RTC to display time only. I need to display in 12 hour format. I am unable to convert it to 12 hour mode. I have found several pages talking on how to do it,but none of them work. The full code shows time, Humidity, and temperature on a IC2 128x64 Oled. I would like to do the conversion in the sketch attached.

thanks

new_temp_code.ino (2.2 KB)

http://forum.arduino.cc/index.php?topic=13886.0

Idahowalker:
DS1307 - 12 hour vs 24 hour - Interfacing - Arduino Forum

I read that thread before, a bit confusing and didn't help.

The DS3231 is actually more accurate . Another thread here :

https://forum.arduino.cc/index.php?topic=444701.0

stilgarhammer:
I read that thread before, a bit confusing and didn't help.

What's so confusing? Did you try the suggestion from Reply #1 of that thread? It's pretty straight forward. Don't know if it will work, but seems simple enough to try.

If the hour value is more than 12, subtract 12 and show PM instead of AM. How difficult is THAT?