laravel - Can't format datetime in carbon -


when try format $date d/m/y it's work fine

$date = '20/4/2015'; carbon::createfromformat('d/m/y', $date) 

but when try format $date d/m/y

$date = '20/4/2015'; carbon::createfromformat('d/m/y', $date) 

i got error following,

the separation symbol not found trailing data

what wrong in code?

m means textual representation of month. 4 cannot parset month , fails though strange message. try , works

    $date = '20/jan/2015';     $carbdate=carbon::createfromformat('d/m/y', $date);     dd($carbdate); 

outputs

carbon {#260 ▼   +"date": "2015-01-20 10:01:01"   +"timezone_type": 3   +"timezone": "utc" } 

Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -