About 13,300,000 results
Open links in new tab
  1. How do I get the current date and time in PHP? - Stack Overflow

    Jan 23, 2009 · For the new PHP programmer might confuse why there are lot of method for to get current date and time and which one to use in their project. 1. date method (PHP 4, PHP 5, …

  2. PHP date () format when inserting into datetime in MySQL

    Feb 7, 2010 · What is the correct format to pass to the date() function in PHP if I want to insert the result into a MySQL datetime type column? I've been trying date('Y-M-D G:i:s') but that just …

  3. 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, …

  4. datetime - NOW () function in PHP - Stack Overflow

    Is there a PHP function that returns the date and time in the same format as the MySQL function NOW()? I know how to do it using date(), but I am asking if there is a function only for this.

  5. 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 …

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

    PHP 5.3 and up Use DateTime::createFromFormat. It allows you to specify an exact mask - using the date() syntax - to parse incoming string dates with. PHP 5.2 and lower You will have to …

  7. How to calculate the difference between two dates using PHP?

    Mar 24, 2009 · 593 Use this for legacy code (PHP < 5.3; Jun 2009). For up to date solution see jurka s' answer above. You can use strtotime () to convert two dates to unix time and then …

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

    I am trying to convert a date from dd/mm/yyyy =&gt; yyyy-mm-dd. I have using the mktime() function and other functions but I cannot seem to make it work. I have managed to explode the …

  9. PHP - add 1 day to date format mm-dd-yyyy - Stack Overflow

    Apr 15, 2013 · The $date will be coming from a POST in the format m-d-Y, I need to add one day and have it as a new variable to be used later. Do I have to convert $date to Y-m-d, add 1 day, …

  10. php - Formatting date to human readable format - Stack Overflow

    Sep 30, 2013 · Use strtotime() to convert that string into a Unix Timestamp, then use the date() function to display it like you want.