2026 Community Survey results are here! See how the Craft CMS community works. results are live!

date() Function

The date() function in Twig converts a string date to a DateTime object.

Transcript

Premium

Follow along with the full transcript

Search every word, click any line to jump to that moment, and read along as you watch — a CraftQuest Premium feature.

Sign up for Premium
Topic
Instructor
Level
Beginner
Date Published
July 12, 2018