Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. QueryPluginBase.php

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

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal