function QueryPluginBase::getDateField

Same name in other branches
  1. 9 core/modules/views/src/Plugin/views/query/QueryPluginBase.php \Drupal\views\Plugin\views\query\QueryPluginBase::getDateField()
  2. 8.9.x core/modules/views/src/Plugin/views/query/QueryPluginBase.php \Drupal\views\Plugin\views\query\QueryPluginBase::getDateField()
  3. 10 core/modules/views/src/Plugin/views/query/QueryPluginBase.php \Drupal\views\Plugin\views\query\QueryPluginBase::getDateField()

Returns a Unix timestamp to database native timestamp expression.

Parameters

string $field: The query field that will be used in the expression.

bool $string_date: For certain databases, date format functions vary depending on string or numeric storage.

bool $calculate_offset: If set to TRUE, the timezone offset will be included in the returned field.

Return value

string An expression representing a timestamp with time zone.

1 method overrides QueryPluginBase::getDateField()
Sql::getDateField in core/modules/views/src/Plugin/views/query/Sql.php
Returns a Unix timestamp to database native timestamp expression.

File

core/modules/views/src/Plugin/views/query/QueryPluginBase.php, line 229

Class

QueryPluginBase
Base plugin class for Views queries.

Namespace

Drupal\views\Plugin\views\query

Code

public function getDateField($field, $string_date = FALSE, $calculate_offset = TRUE) {
    return $field;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.