Hi. I’m using the template tag [[time|%I:%M%p]], but I’d like to be able to remove the leading zero from the hour section. How do I do that? Thank you.
Try: [[time|%l:%M%p]]
(lowercase L, instead of “I”)
For future reference, there’s a section on date-time tags in this template article, including a link with a reference of all available formats codes;
1 Like
And if you need to eliminate the leading space character that [[time|%l:%M%p]]
gives you, put a hyphen (think of it as a minus sign) in front of the l
: [[time|%-l:%M%p]]
.
If you did that wouldn’t you also want to add “A” or “P”? Or is that already in and I didn’t get it?
The p is on the end. It’s %p.
1 Like