Source: 5balloons.info

Carbon date String formatting
To format a Carbon date to string output, you can use the format function and pass the following parameter $carbonDate->format('l jS \\of F Y h:i:s A'); //Output -> Thursday 25th of December 1975 02:15:16 PM If you are looking to shorten the day and month in this format you can use $carbonDate->format('D jS \\of M Y h:i:s A'); //Output -> Mon 17th of Oct 2022 06:33:47 AM If you are looking to output the time in 24 hour time instead of AM/PM you can use following $carbonDate->format('D jS \\of M Y H:i:s'); //Output -> Mon 17th of Oct 2022 18:33:47
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners