Four letter phat 12 hr clock


#1

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.


#2

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


#3

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


#4

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.


#5

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


#6

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.


#7

sound like that would work ,thanks