sipvoip
(Nathan Stratton)
1
Google around for this, but can’t seem to find it. I am trying to display DateTime in the following as 12 hour AM / PM time.
DateTime Sunrise_Time "Sunrise [%1$tH:%1$tM]" {astro="planet=sun, type=rise, property=start"}
DateTime Sunset_Time "Sunset [%1$tH:%1$tM]" {astro="planet=sun, type=set, property=end"}
sipvoip
(Nathan Stratton)
2
DateTime Sunrise_Time “Sunrise [%1$tl:%1$tM %1$tp]” {astro=“planet=sun, type=rise, property=start”}
DateTime Sunset_Time “Sunset [%1$tl:%1$tM %1$tp]” {astro=“planet=sun, type=set, property=end”}
I have
DateTime Sunrise_Time “Sunrise [%1$tl:%1$tM %1$tp]” {astro=“planet=sun, type=rise, property=start”}
DateTime Sunset_Time “Sunset [%1$tl:%1$tM %1$tp]” {astro=“planet=sun, type=set, property=end”}
in my items file. It does display in 12 hour format but it fails to append AM or PM to the displayed time in the item state. Any clues?
rossko57
(Rossko57)
4
You haven’t accidentally overriden the Item provided label by setting a label in your Sitemap entry?
johntech
(john)
5
Check here for time and date formatting commands.
It should look something like this
DateTime Date "Date [%1$tA, %1$tB %1$td, %1$tY]"
DateTime Time "Time [%1$tI:%1$tM %1$Tp]"
Pay close attention to the capitalization of the letters within the [ ] !!