How do I format the date and time I got from an entry? 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

&lt;p&gt;{{entry.datum}}&lt;/p&gt;


Starttime

&lt;p&gt;{{entry.begintijd}}&lt;/p&gt;


Endtime

&lt;p&gt;{{entry.eindtijd}}&lt;/p&gt;


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
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:

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


And the date format for 1 Januari 2015 will be as follows:

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


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