Level 18
If the $results->start_date and $results->end_date are timestamps then, you can simple use php date() function like below
date('d-M', $results->start_date);
and
date('d-M', $results->end_date);
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
// iam trying to get date in this format: dd-mm only and how i display on screen like this : 07-march
<p>
<i class="far fa-calendar-alt"></i>
{{ $results->start_date}} - {{ $results->end_date }}
</p>
If the $results->start_date and $results->end_date are timestamps then, you can simple use php date() function like below
date('d-M', $results->start_date);
and
date('d-M', $results->end_date);
Please or to participate in this conversation.