What is the standard format for storing date values in databases using PHP?

When storing date values in databases using PHP, it is recommended to use the standard format of 'YYYY-MM-DD' for dates. This format ensures consistency and compatibility across different database systems and makes it easier to perform date-related operations and queries.

$date = '2022-10-15'; // Date value in 'YYYY-MM-DD' format
// Store the date value in a database using PDO
$stmt = $pdo->prepare("INSERT INTO table_name (date_column) VALUES (:date)");
$stmt->bindParam(':date', $date);
$stmt->execute();