Question Detail

How to fetch only date from datetime field using php


Thread Reply

Anonymous

- 1 years ago

You can use strtotime() and date() of php as :

$originalDate = $row->start_date;
$newDate = date("d-m-Y", strtotime($originalDate));