Published on January 26, 2024By DeveloperBreeze
// Convert a human-readable date into a MySQL-compatible date format
$original_date = "March 5, 2024";
$mysqlDate = Carbon::parse($original_date)->format('Y-m-d');
// $mysqlDate will be "2024-03-05"
// Convert a human-readable date into a MySQL-compatible date format
$original_date = "March 5, 2024";
$mysqlDate = Carbon::parse($original_date)->format('Y-m-d');
// $mysqlDate will be "2024-03-05"
Published on January 26, 2024
Comments
Please log in to leave a comment.