# Four letter phat 12 hr clock

**URL:** <https://forums.pimoroni.com/t/four-letter-phat-12-hr-clock/8822>\
**Category:** Support\
**Created:** [October 2, 2018, 7:49pm UTC](https://forums.pimoroni.com/t/four-letter-phat-12-hr-clock/8822 "2018-10-02T19:49:51Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![caper1953](https://avatars.discourse-cdn.com/v4/letter/c/9e8a1a/32.png) [@caper1953](https://forums.pimoroni.com/u/caper1953)\
**Post date:** [October 2, 2018, 7:49pm UTC](https://forums.pimoroni.com/t/four-letter-phat-12-hr-clock/8822/1 "2018-10-02T19:49:51Z")

</div>

is it possible to use and alter the code somehow from a 24 hr clock to a 12hr clock for use in Canada. thank you , it work fine for 24 hr clock ,eventually want to teach my Grandson to tell time ,when it gets old enough  
[https://learn.pimoroni.com/tutorial/sandyj/getting-started-with-four-letter-phat](https://learn.pimoroni.com/tutorial/sandyj/getting-started-with-four-letter-phat).

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [October 2, 2018, 8:22pm UTC](https://forums.pimoroni.com/t/four-letter-phat-12-hr-clock/8822/2 "2018-10-02T20:22:52Z")

</div>

Have a look at this, [http://strftime.org/](http://strftime.org/)  
Try `%-I%M` instead of %H%M. Not sure how you’ll designate PM, put a dot at the end maybe?

---

<div class="post-metadata">

**Author:** ![caper1953](https://avatars.discourse-cdn.com/v4/letter/c/9e8a1a/32.png) [@caper1953](https://forums.pimoroni.com/u/caper1953)\
**Post date:** [October 2, 2018, 9:31pm UTC](https://forums.pimoroni.com/t/four-letter-phat-12-hr-clock/8822/3 "2018-10-02T21:31:13Z")

</div>

thanks, that worked ,not really worried right now about am -pm

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [October 3, 2018, 11:16am UTC](https://forums.pimoroni.com/t/four-letter-phat-12-hr-clock/8822/4 "2018-10-03T11:16:44Z")

</div>

I had a feeling you would say that. ;)  
I show the time in a scrolling message on my sense hat LED matrix. I chose to show the AM PM at the end.  
I do `dateString = "%A %B %-d %-I:%M:%p"`  
I end up with 8:13:AM as an example. I did a few Google searches before I found that link I posted. Trial and (mostly) error got me all kinds of weird stuff displayed lol.

---

<div class="post-metadata">

**Author:** ![caper1953](https://avatars.discourse-cdn.com/v4/letter/c/9e8a1a/32.png) [@caper1953](https://forums.pimoroni.com/u/caper1953)\
**Post date:** [October 3, 2018, 12:02pm UTC](https://forums.pimoroni.com/t/four-letter-phat-12-hr-clock/8822/5 "2018-10-03T12:02:59Z")

</div>

i don’t think its possible to show the am/pm on the fourletter phat anyway…I will save the link

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [October 3, 2018, 12:22pm UTC](https://forums.pimoroni.com/t/four-letter-phat-12-hr-clock/8822/6 "2018-10-03T12:22:48Z")

</div>

I think the best you could do is lite up the dot in the lower right for PM.  
The -I takes out any leading zero’s, just so you know. If you put in just I you’ll get 08 13 etc.  
I’d rather have 8 13 myself.

---

<div class="post-metadata">

**Author:** ![Caperjack1953](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/caperjack1953/32/7923_2.png) [@Caperjack1953](https://forums.pimoroni.com/u/Caperjack1953)\
**Post date:** [October 3, 2018, 2:04pm UTC](https://forums.pimoroni.com/t/four-letter-phat-12-hr-clock/8822/7 "2018-10-03T14:04:55Z")

</div>

sound like that would work ,thanks
