About 5,020,000 results
Open links in new tab
  1. Convert a date format in PHP - Stack Overflow

    The PHP strtotime manual here states that "The function expects to be given a string containing an English date format". What it actually means is that it expects an American US date format, such as …

  2. How to reformat date in PHP? - Stack Overflow

    Feb 17, 2016 · I am pulling the dates of various posts from a database. The dates are in the following format: 2009-08-12 Numeric Year - Numeric Month - Numeric Day How can I reformat these dates to …

  3. Convert one date format into another in PHP - Stack Overflow

    The second parameter to date() needs to be a proper timestamp (seconds since January 1, 1970). You are passing a string, which date () can't recognize. You can use strtotime () to convert a date string …

  4. Correctly determine if date string is a valid date in that format

    Oct 9, 2013 · I am currently using a regex to validate the string format, which works ok, but I can see some cases where it could be a correct format according to the string but actually an invalid date. i.e. …

  5. php - The date/time format used in HTTP headers - Stack Overflow

    67 Which RFC describes the format used for date/time in the modern time HTTP headers, like "Last-Modified" and "If-Modified-Since", and how to generate a date/time string in PHP according to such …

  6. PHP convert date format dd/mm/yyyy => yyyy-mm-dd

    I would recommend using a Unix Timestamp integer instead of a human-readable date format to handle time internally, then use PHP's date() function to convert the timestamp value into a human-readable …

  7. How do I get the current date and time in PHP? - Stack Overflow

    Jan 23, 2009 · To get current datetime (now) with PHP, you can use the date class with any PHP version, or better the datetime class with PHP >= 5.2. Various date format expressions are available …

  8. php - Converting string to Date and DateTime - Stack Overflow

    376 If I have a PHP string in the format of mm-dd-YYYY (for example, 10-16-2003), how do I properly convert that to a Date and then a DateTime in the format of YYYY-mm-dd? The only reason I ask for …

  9. How to format an UTC date to use the Z (Zulu) zone designator in php?

    Jun 28, 2013 · Note that the accepted answer simply puts a "Z" on the end of the format string, but that does not give you the UTC date. This is likely to cause problems in many use cases where a …

  10. php - Convert to date format dd/mm/yyyy - Stack Overflow

    Apr 19, 2010 · I have the following date: 2010-04-19 18:31:27. I would like to convert this date to the dd/mm/yyyy format.