<p>You'll actually need to add a double backwards slash in front of each character you want to escape, i.e.</p>

<pre><code>{{ entry.postDate|date('jS F Y \\a\\t ga') }}
</code></pre>

<p>See <a href="http://twig.sensiolabs.org/doc/filters/date.html#date" rel="nofollow noreferrer">the official Twig docs</a> for more info.</p>

CC BY-SA 3.0
2016-11-09T01:23:04.530Z
Thanks Mats, I followed the php date reference [link](http://php.net/manual/en/function.date.php) in our Craft manual...
Nutmeg
CC BY-SA 3.0
2016-11-08T22:03:15.357Z
2016-11-08T22:03:15.357Z
Mats Mikkel Rummelhoff
<p><code>{{ entry.postDate|date('jS F Y \at ga') }}</code>This should produce this <code>5th November 2016 at 4am</code>but it doesn't seem to recognise the escape and adds 30 instead of at.</p>

<datetime>
Escaping characters in entry.postDate|date
# Escaping characters in entry.postDate|date

(Asked by: username_0 on 2016-11-08)

`{{ entry.postDate|date('jS F Y \at ga') }}`This should produce this `5th November 2016 at 4am`but it doesn't seem to recognise the escape and adds 30 instead of at.

**Tags:** datetime


---

## 1 answers

### Answer by username_1 on 2016-11-08. Score: 1 | Accepted answer

You'll actually need to add a double backwards slash in front of each character you want to escape, i.e.
{{ entry.postDate|date('jS F Y \\a\\t ga') }}

See the official Twig docs for more info.

> **Comments:**
> **username_0**: Thanks Mats, I followed the php date reference [link](http://php.net/manual/en/function.date.php) in our Craft manual...  

---

