The format string can be any string literal, containing 0 or more format
specifiers.
The date argument can be any expression as long as it resolves to a date.
public dateToString ( string $format, mixed | self $expression ) | ||
$format | string | |
$expression | mixed | self |
/** * Converts a date object to a string according to a user-specified format. * * The format string can be any string literal, containing 0 or more format * specifiers. * The date argument can be any expression as long as it resolves to a date. * * @see http://docs.mongodb.org/manual/reference/operator/aggregation/dateToString/ * @see Expr::dateToString * @param string $format * @param mixed|Expr $expression * @return self */ public function dateToString($format, $expression) { $this->expr->dateToString($format, $expression); return $this; }