src/Object/Order/Order.php
public function setCreatedAt($createdAt)
    {
        if ($createdAt instanceof \DateTime
            || (is_object($createdAt) && method_exists($createdAt, 'format'))) {
            $this->createdAt = $createdAt->format('Y-m-d H:i:s');
        } else {
            $this->createdAt = $createdAt;
        }
    }
public function setCreatedAt($createdAt)
    {
        if ($createdAt instanceof \DateTime
            || (is_object($createdAt) && method_exists($createdAt, 'format'))) {
            $this->createdAt = $createdAt->format('Y-m-d H:i:s');
        } else {
            $this->createdAt = $createdAt;
        }
    }
public function setCreatedAt ( $ createdAt ) { if ( $ createdAt instanceof \ DateTime || ( is_object ( $ createdAt ) && method_exists ( $ createdAt , 'format' ) ) ) { $ this -> createdAt = $ createdAt -> format ( 'Y-m-d H:i:s' ) ; } else { $ this -> createdAt = $ createdAt ; } }
Sets the date when the OrderConfirm was placed in the format Y-m-d

@param \DateTimeInterface|\DateTime|string $createdAt the created date.
Sets the date when the OrderConfirm was placed in the format Y - m - d