Home/Tools/PHP Date Format Tester

PHP Date Tools

PHP Date Format Tester

Preview common PHP date format tokens against the current time or a supplied timestamp.

Preview

2026-07-01 12:00:00

Use this tester to quickly preview common PHP date() format strings before placing them in code.

Common tokens

  • Y four digit year
  • m month with leading zero
  • d day with leading zero
  • H 24-hour hour
  • i minutes
  • s seconds

PHP example

echo date('Y-m-d H:i:s');

Common mistakes

m means month and i means minutes. Mixing them is one of the most common PHP date formatting bugs.

FAQ

Does this support every PHP date token?

The first version supports common date tokens used in day-to-day PHP debugging.

Which timezone is used?

The preview uses your browser timezone. In PHP, configure the timezone explicitly for consistent output.

Related tools

Related guides