I am using Laravel Framework 6.16.0 and want to parse a date with carbon "Dec 14 02:04 PM":
$fillingDate = "Dec 14 02:04 PM";
$filling_Date = Carbon::parse($fillingDate, 'UTC');
// result is only a string "Dec 14 02:04 PM"
When using the above structure I only get the string back. However, I would like to get a Carbon object that gets then formatted to ->format('Y-m-d').
Any suggestions what I am doing wrong?
I appreciate your replies!
Carbon::parse()should either return a Carbon instance or an "InvalidFormatException".Carbon::parse($fillingDate, 'UTC')should give back a full Carbon instancedd($filling_date)? It is a Carbon instance in my code:=> Carbon\Carbon @1607954640 {#3300 date: 2020-12-14 14:04:00.0 UTC (+00:00), timezone_type: 3, timezone: "UTC", }