SyntaxFix
Write A Post
Hire A Developer
Questions
format = '%Y-%m-%d %H:%M %p'
The format is using %H instead of %I. Since %H is the "24-hour" format, it's likely just discarding the %p information. It works just fine if you change the %H to %I.
%H
%I
%p