Format date

Hi all How to format date in volt, this is my code {{ date('d-m-Y',date)}}, run error : A non well formed numeric value encountered in

If i use php <?php print_r (date("d-m-Y",strtotime($date)));?> very gool, i doesn't see strotime in volt


just write ```php {{ date("d-m-Y") }} ``` or ```php {{ date("d-m-Y", time()) }} ``` If you want print custom time from variable, this variable must be integer type of Unix timestamp. Example ```php {% set today = time() %} <p>Today is: {{ date("d-m-Y", today) }} </p>

{% set tomorrow = time()+86400 %} <p>Tomorrow is: {{ date("d-m-Y", tomorrow) }} </p> ```


Register the strtotime function as shown in the documentation Then you can use

{{ date('d-m-Y', strtotime(date)) }}