Skip to main content

Posts

Showing posts from August, 2025

Welcome to the Drupal Playground!

Hey there, Drupal enthusiasts! 🎉

We’re thrilled to welcome you to Drupal Playground, where creativity, innovation, and the power of Drupal come together. This is your space to explore, learn, and build amazing things using one of the most flexible CMS platforms out there.

Happy Drupaling!
— The Drupal Playground Team

How to Display Only the Created/Updated Date in Drupal 11 Views (Without

 In Drupal 11 , when you add the created date field in a View, you might see output like this: <time datetime="2025-08-06T08:01:47+00:00" title="Wednesday, August 6, 2025 - 08:01" class="datetime">08/06/2025 - 08:01</time> If you only want the plain date/time string like: 08/06/2025 - 08:01 Why Default Options Don’t Work in Drupal 11 Even if you check “Strip HTML tags” , the <time> element still appears. Using custom formatters doesn’t fully remove the HTML. This is because in Drupal 11, the DateTimeFormatter automatically wraps date output in a <time> element , by default. Solution Here’s how you can display just the plain date/time string: Steps: Go to your View in the Drupal admin. In the Fields section, edit the "Authored on / created " field. Check the box: “Rewrite results” In the "Text to display" box, enter this Twig code: {{ created.value|date("m/d/Y - H:i") }} (Change the date for...