php.org PHP Logo
Beginner Intermediate Advanced

Search results for: "date_format"

What are the differences between using the DATE_FORMAT function and the date function in PHP for converting timestamps?

When converting timestamps in PHP, the DATE_FORMAT function is used to format a date string according to a specified format, while the date function i...

When using DATE_FORMAT in MySQL queries, what are some common pitfalls to avoid?

When using DATE_FORMAT in MySQL queries, one common pitfall to avoid is not properly escaping the date format string. This can lead to SQL injection v...

In PHP, how can the formatting of a date retrieved from MySQL be done directly in the query using the DATE_FORMAT() function?

When retrieving a date from MySQL in PHP, you can format the date directly in the query using the DATE_FORMAT() function. This allows you to retrieve...

In what scenarios would it be advisable to use DATE_FORMAT() in SQL queries to handle date formatting instead of PHP functions?

When you need to format dates directly within SQL queries, it is advisable to use the DATE_FORMAT() function instead of PHP functions. This is particu...

How can the DATE_FORMAT function in MySQL be utilized to display dates in a specific format when retrieved from the database?

When retrieving dates from a MySQL database, the DATE_FORMAT function can be used to display the dates in a specific format. This function allows you...

Showing 21 to 25 of 227 results

‹ 1 2 3 4 5 6 7 8 9 10 ... 45 46 ›
PHP.ORG

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

Legal

  • About
  • Contact / Imprint
  • Terms
  • FAQ

© 2025 php.org. All rights reserved.