#1
  1. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2009
    Posts
    676
    Rep Power
    7

    Date Object not creating...


    As far as I'm concerned, I changed nothing in this area, but it seems to have stopped. I have added a column or 2 before this, but have also changed and confirm the $col7 is the desired response from MySQL. Anyone see what I may be overlooking? Thanks for any input...

    PHP Code:
    while ($statement->fetch()) {
      echo 
    $col7;   //  2010-07-15 16:26:28
        
    $PEnd DateTime::createFromFormat('Y-m-d h:i:s'$col7); // Want/Tried format Y-m-d
      
    echo $PEnd->format('m/d/y');  //  Fatal error: Call to a member function format() on a non-object... 
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2009
    Posts
    676
    Rep Power
    7
    Bleh. Just now noticed their time is 24-hour, so my format was wrong in end. Sorry y'all.

IMN logo majestic logo spyfu logo threadwatch logo seochat tools logo