Format

You can specify the date format using the date_format parameter. It accepts a string that follows the Python's strftime format. For example, if you want to show the year and month, you can set date_format="%Y-%m". If you also want to show the time, you can include the time format as well, for example: date_format="%Y-%m, %H:%M".

{%- call ui.util.call(show_example) -%} {%- raw %} {%- set now = ui.util.now() -%} {{ ui.datetime(now, date_format="%Y-%m, %H:%M") }} {%- endraw %} {%- endcall %}