You are here

public function QueryPluginBase::getDateField in Drupal 8

Same name and namespace in other branches
  1. 9 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 219

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;
}