Make 24 hour time sensors to 12 hour format

hey all,

i have been trying for so so long now to have my time sensors show in 12 hour formats but am compleatly unable to work it out,

i have changed my user settings to 12 hour, i have been looking at peoples templates but have no idea where to put them, any time i try to look i just hit a wall

to explain i would like to have the “start time” and “end time” sensors to show in a 12 hour format


image

i would love to have something that i can use on any/all time sensors because i use 12 hour far more then 24 so it would be a nice all round thing to have or just something i can easily assign to any time sensor i choose

i have been looking for so long but just cant figure this out so any help would be aappreciated