Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel carbon time format

//Syntax example : create new dateTime from chosen format
$start_time = Carbon::createFromFormat('H:i', '08:00');
// Outputs 'YYYY-MM-DD 08:00:00'

//Syntax example : parse existing dateTime into chosen format
Carbon::parse($start_time)->form
// Outputs '08:00'
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #laravel #carbon #time #format
ADD COMMENT
Topic
Name
7+6 =