Date vs Timestamp field-type My new project involves the requirement of manually setting a time of creation of nodes because they're looking into manually migrating parts of their old website into their new one. The date will mainly be used to sort the nodes, only 2 out of 6 content types will have the date printed in the frontend.

In D8 you can select between a date and timestamp field. Both output options seem to be the same. The only difference I noticed is the HTML output.

The timestamp output looks like this

&lt;div class="field__item"&gt;Mon, 03/18/2019 - 18:00&lt;/div&gt;


Date output looks like that

&lt;time datetime="2019-03-18T18:00:17Z" class="datetime"&gt;Mon, 03/18/2019 - 18:00&lt;/time&gt;


I found a documentation page for D7 on the matter: https://www.drupal.org/node/1455576 but I have the feeling that this information doesn't apply for those two field types in D8.

Which one should I choose for this purpose? And what's the difference in D8 between those two field types?
In Drupal 8, timestamps (and created and updated) are stored as integers in the database.  They do not use the native datatype.  Timestamps can be added via the UI, but created and updated can only be used as basefields.

Datetime and daterange fields are stored as ISO strings: date-only as Y-m-d and date+time as the full ISO8601 format (currently without the UTC offset).  These are store as plain strings, not as a native type, since the date/time handling in the default database backends is not portable.

The reason you are seeing different HTML, is that the two field types use different formatters.  Your timestamp is using TimestampFormatter and it looks like your datetime is using DatetimeDefaultFormatter.  It is possible to get both fields to output the same if you use the DatetimePlainFormatterformatter. You can also write your own formatter for timestamps to output HTML5 time.  For various reasons, they formatters between the two types are different.