HI I have a DATE mysql column and i wish to change the stored format from YYYY-MM-DD to dd-mm-yyyy when taking out the DB.
at the moment i have
$jobs=$jobs->orderBy('created_at','desc')->take($numrow)->select(
'Date', 'Distance', 'CustMileage', 'created_at', 'updated_at'
)->get();
I tried
$jobs=$jobs->orderBy('created_at','desc')->take($numrow)->select(
DB::raw('DATE_FORMAT("Date", "%d %M, %Y")') , 'Distance', 'CustMileage', 'created_at', 'updated_at'
)->get();
but query came back empty for date column?
Thanks for any help
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community