php.org PHP Logo
Beginner Intermediate Advanced

Search results for: "Y-m-d"

What is the correct format for storing date and time in a MySQL database using PHP?

When storing date and time in a MySQL database using PHP, the recommended format is the MySQL DATETIME format 'Y-m-d H:i:s'. This format ensures that...

What are some common pitfalls when adding dates in PHP, and how can they be avoided?

One common pitfall when adding dates in PHP is not properly formatting the date string before performing operations on it. To avoid this, always ensur...

How can a timestamp be converted to RFC 2822 format in PHP?

To convert a timestamp to RFC 2822 format in PHP, you can use the `date()` function along with the `D, d M Y H:i:s O` format specifier. This format sp...

What are some common mistakes to avoid when working with dates in PHP and MySQL?

One common mistake to avoid when working with dates in PHP and MySQL is not properly formatting dates before inserting them into the database. To ensu...

How can SQL be used to solve the issue of displaying different dates in the list?

Issue: To display different dates in a list, you can use SQL to retrieve the dates from a database table and then format them as needed before display...

Showing 31 to 35 of 577 results

‹ 1 2 3 4 5 6 7 8 9 10 ... 115 116 ›
PHP.ORG

A free knowledge base for PHP developers. Open to all.

Legal

  • About
  • Contact / Imprint
  • Terms
  • FAQ

© 2025 php.org. All rights reserved.