public function HandlerBase::getDateFormat

Creates cross-database SQL date formatting.

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.

2 calls to HandlerBase::getDateFormat()
Date::getFormula in drupal/core/modules/views/lib/Drupal/views/Plugin/views/argument/Date.php
Overrides \Drupal\views\Plugin\views\argument\Formula::getFormula().
Date::query in drupal/core/modules/views/lib/Drupal/views/Plugin/views/sort/Date.php
Called to add the sort to a query.

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/HandlerBase.php, line 623
Definition of Drupal\views\Plugin\views\HandlerBase.

Class

HandlerBase

Namespace

Drupal\views\Plugin\views

Code

public function getDateFormat($format) {
  return $this->query
    ->getDateFormat($this
    ->getDateField(), $format);
}