date format change in laravel
date('d-m-Y', strtotime($user->from_date));
/**
or
**/
date_format($user->from_date,'D M Y')
0
0
date('d-m-Y', strtotime($user->from_date));
Thank you!
0
0
4
3
{{date_format($data->con_date_maintained,'D M Y')}}
{{ $data->con_wash_start_date == null ? date_format($data->con_date_maintained,'D M Y') : "-" }}
//$uj@y
Thank you!
3
0
3.67
6
//
$editData->hld_end_date ? date('d-m-Y',strtotime($editData->hld_end_date)) : null // bydefault null
date('d-m-Y',strtotime(str_replace('/', '-', $editData->hld_end_date) //bydefault value is null then 01-01-1970
date_format(date_create($editData->hld_end_date),'d-m-Y') //bydefault value is null then Today date
$editData->hld_end_date->format('d-m-Y') // null error
\Carbon\Carbon::parse($editData->hld_end_date)->format('d/m/Y') //bydefault value is null then 01-01-1970
//$uj@y
Thank you!
6
0
Are there any code examples left?
New code examples in category PHP
-
PHP 2022-03-27 22:40:03 index:of curiosa 2019 mp4
-
PHP 2022-03-27 22:35:13 Dijkstra’s algorithm php
-
PHP 2022-03-27 22:35:12 get_declared_classes
-
PHP 2022-03-27 22:30:23 php move index of a value to first position in array
-
PHP 2022-03-27 22:25:01 wordpress get_date
-
PHP 2022-03-27 21:30:38 php shorten string with dots
-
PHP 2022-03-27 21:10:46 php header 500
-
PHP 2022-03-27 21:05:06 laravel schedule run
-
PHP 2022-03-27 20:25:12 Get page title, excerpt or content by id
-
PHP 2022-03-27 20:00:27 php convert date from dd/mm/yyyy to yyyy-mm-dd