Web Analytics

PHP strftime() Function

Date/Time FunctionPHP 4+

The strftime() function formats a local time/date according to locale settings. This is useful for displaying dates in different languages.

Warning: This function has been DEPRECATED as of PHP 8.1.0. Relying on this function is highly discouraged. Use date() or IntlDateFormatter::format() instead.

Syntax

strftime(string $format, ?int $timestamp = null): string|false

Try It Online

Output
Click Run to execute your code

Related Functions

  • strptime() - Parse a time/date generated with strftime
  • date() - Format a local time/date