Date and time template functions

These template functions help you work with dates, times, and durations. Use them to get the current time, format timestamps for display, calculate how long ago something happened, or convert between different time representations.

Home Assistant extends the Jinja2 template engine with many custom functions, filters, and tests. Each function on this page has its own page with detailed descriptions, parameters, and practical examples.

New to templates? Start with the templating documentation to learn the basics.