<p>You can use the Twig <code>.format()</code> filter to achieve exactly what you are looking for, the reference page for date and time values is <a href="http://php.net/manual/en/function.date.php" rel="nofollow">here</a>.</p>

<p>So if you would like the date format to show 15:00, you can use:</p>

<pre><code>&lt;p&gt;{{ entry.lorem.format('H:i') }}&lt;/p&gt;
</code></pre>

<p>And the date format for 1 Januari 2015 will be as follows:</p>

<pre><code>&lt;p&gt;{{ entry.lorem.format('j F Y') }}&lt;/p&gt;
</code></pre>

<p>As I say, you can reference the website for which values to use.</p>

CC BY-SA 3.0
2015-01-18T10:07:13.847Z
A bit of a late reply, but I wanted to thank Jamie Wade for the answer!
Evin Wijninga
CC BY-SA 3.0
2014-12-05T16:07:22.607Z
2015-05-06T12:55:54.793Z
2015-05-06T12:55:54.793Z
Jamie Wade
<p>I am working on a project where the content manager can add events (entries). These events have a date, starting time and end time. The fields in the cms show the option for adding a date, time and time accordingly.</p>

<p>To print them in HTML I do this.</p>

<p>Date</p>

<pre><code>&lt;p&gt;{{entry.datum}}&lt;/p&gt;
</code></pre>

<p>Starttime</p>

<pre><code>&lt;p&gt;{{entry.begintijd}}&lt;/p&gt;
</code></pre>

<p>Endtime</p>

<pre><code>&lt;p&gt;{{entry.eindtijd}}&lt;/p&gt;
</code></pre>

<p>However, only the date is shown, like this:</p>

<p>2014-11-30</p>

<p>2014-11-30</p>

<p>2014-11-30</p>

<p>How do I format the result so I get the times in a format like 15:00?</p>

<p>Also, how do I format the date to be shown in Dutch time format, like 1 januari 2015?</p>

<p>Thanks in advance</p>

<entry><datetime>
How do I format the date and time I got from an entry?
# How do I format the date and time I got from an entry?

(Asked by: username_0 on 2014-12-05)

I am working on a project where the content manager can add events (entries). These events have a date, starting time and end time. The fields in the cms show the option for adding a date, time and time accordingly.
To print them in HTML I do this.
Date
{{entry.datum}}

Starttime
{{entry.begintijd}}

Endtime
{{entry.eindtijd}}

However, only the date is shown, like this:
2014-11-30
2014-11-30
2014-11-30
How do I format the result so I get the times in a format like 15:00?
Also, how do I format the date to be shown in Dutch time format, like 1 januari 2015?
Thanks in advance

**Tags:** entry, datetime


---

## 1 answers

### Answer by username_1 on 2014-12-05. Score: 3 | Accepted answer

You can use the Twig .format() filter to achieve exactly what you are looking for, the reference page for date and time values is here.
So if you would like the date format to show 15:00, you can use:
{{ entry.lorem.format('H:i') }}

And the date format for 1 Januari 2015 will be as follows:
{{ entry.lorem.format('j F Y') }}

As I say, you can reference the website for which values to use.

> **Comments:**
> **username_0**: A bit of a late reply, but I wanted to thank username_1 for the answer!  

---

