❮ PHP Date/Time Reference Show ExampleFormat a local date and time and return the formatted date strings: <?php // Prints the day, date, month, year, time, AM or PM Try it Yourself » Definition and UsageThe date() function formats a local date and time, and returns the formatted date string. SyntaxParameter Values
Technical Details
❮ PHP Date/Time Reference PHP Date/Time IntroductionThe date/time functions allow you to get the date and time from the server where your PHP script runs. You can then use the date/time functions to format the date and time in several ways. Note: These functions depend on the locale settings of your server. Remember to take daylight saving time and leap years into consideration when working with these functions. InstallationThe PHP date/time functions are part of the PHP core. No installation is required to use these functions. Runtime ConfigurationThe behavior of these functions is affected by settings in php.ini:
PHP Date/Time Functions
PHP Predefined Date/Time Constants
|