What is the format of date in php?
❮ PHP Date/Time Reference Show ExampleReturn a new DateTime object, and then format the date: $date=date_create("2013-03-15"); Try it Yourself » Definition and UsageThe date_format() function returns a date formatted according to the specified format. Note: This function does not use locales (all output is in English). Tip: Also look at the date() function, which formats a local date/time. Syntaxdate_format(object, format) Parameter Values
Technical Details
❮ PHP Date/Time Reference Day
---
---
How can get date in ddExample. $date=date_create("2013-03-15"); echo date_format($date,"Y/m/d H:i:s");
What is yyyy mmm dd format?Date/Time Formats. How does PHP date work?The date function in PHP is used to format the timestamp into a human desired format. The timestamp is the number of seconds between the current time and 1st January, 1970 00:00:00 GMT. It is also known as the UNIX timestamp. The default time zone can also be set programmatically using PHP scripts.
How do you format a date?The international standard recommends writing the date as year, then month, then the day: YYYY-MM-DD.
|