Normally the code is just:
echo date('F d, Y h:mA', strtotime('2009-10-14 19:00:00'));
Note that if strtotime()
can’t figure out the date, it returns the time as 1/1/1970 00:00:00 GMT.
More Related Contents:
- Convert one date format into another in PHP
- Convert to date format dd/mm/yyyy
- Converting to date in PHP from yyyymmdd format
- Php date() Date and time is stuck [closed]
- Days remaining before birthday in php [duplicate]
- How to get time difference in minutes in PHP
- How can I compare two dates in PHP?
- Add number of days to a date
- PHP DateTime::modify adding and subtracting months
- Accessing dates in PHP beyond 2038
- Date Difference in php on days? [duplicate]
- How to list all months between two dates
- PHP date() with timezone?
- Difference between 2 dates in seconds [duplicate]
- PHP convert date format dd/mm/yyyy => yyyy-mm-dd [duplicate]
- increment date by one month
- PHP date format /Date(1365004652303-0500)/
- How to reformat date in PHP?
- Set timezone in PHP and MySQL
- How to convert seconds to time format? [duplicate]
- PHP date() in foreign languages – e.g. Mar 25 Aoû 09 [duplicate]
- PHP date returning wrong Month on subtracting one month
- Change date format (in DB or output) to dd/mm/yyyy – PHP MySQL
- PHP day of week numeric to day of week text
- PHP: How to check if a date is today, yesterday or tomorrow
- Get a PHP DateTime difference in days, considering midnight as a day change
- Laravel Carbon Data Missing
- What is the MM/DD/YYYY regular expression and how do I use it in php?
- In PHP given a month string such as “November” how can I return 11 without using a 12 part switch statement?
- Get date for monday and friday for the current week (PHP)