function Date::getDateFormat
Overridden in order to pass in the string date flag.
Parameters
string $format: A format string for the result, like 'Y-m-d H:i:s'.
Return value
string An appropriate SQL string for the DB type and field type.
Overrides HandlerBase::getDateFormat
File
-
core/
modules/ datetime/ src/ Plugin/ views/ sort/ Date.php, line 58
Class
- Date
- Basic sort handler for datetime fields.
Namespace
Drupal\datetime\Plugin\views\sortCode
public function getDateFormat($format) {
return $this->query
->getDateFormat($this->getDateField(), $format, TRUE);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.