DateTime::format DateTimeImmutable::format DateTimeInterface::format date_format Returns date formatted according to given format &reftitle.description; &style.oop; public stringDateTime::format stringformat public stringDateTimeImmutable::format stringformat public stringDateTimeInterface::format stringformat &style.procedural; stringdate_format DateTimeInterfaceobject stringformat Returns date formatted according to given format. &reftitle.parameters; &date.datetime.description; format Format accepted by date. &reftitle.returnvalues; Returns the formatted date string on success&return.falseforfailure;. &reftitle.examples; <function>DateTime::format</function> example &style.oop; format('Y-m-d H:i:s'); ?> ]]> &style.procedural; ]]> &example.outputs; &reftitle.notes; This method does not use locales. All output is in English. &reftitle.seealso; date