Skip to content
Twig Field Finder
Theme

Date range — start / end

Fill in your field name

Italic values are placeholders: replace them with your own machine names, or let the builder do it.

Reads the entity directly, before field formatters run.

  1. Snippet 1
    {{ node.field_name.value }}
  2. Snippet 2
    {{ node.field_name.end_value }}
  3. Snippet 3
    {{ node.field_name.start_date|date('d.m.Y') }}
  4. Snippet 4
    {{ node.field_name.end_date|date('d.m.Y') }}

Gotcha

value and end_value are stored strings (UTC). start_date and end_date are date objects, so |date can format them.