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

Breadcrumb

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

function DateSqlInterface::getDateField

Returns a native database expression for a given field.

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.

Return value

string An expression representing a date field with timezone.

3 methods override DateSqlInterface::getDateField()
MysqlDateSql::getDateField in core/modules/views/src/Plugin/views/query/MysqlDateSql.php
Returns a native database expression for a given field.
PostgresqlDateSql::getDateField in core/modules/views/src/Plugin/views/query/PostgresqlDateSql.php
Returns a native database expression for a given field.
SqliteDateSql::getDateField in core/modules/views/src/Plugin/views/query/SqliteDateSql.php
Returns a native database expression for a given field.

File

core/modules/views/src/Plugin/views/query/DateSqlInterface.php, line 28

Class

DateSqlInterface
Defines an interface for handling date queries with SQL.

Namespace

Drupal\views\Plugin\views\query

Code

public function getDateField($field, $string_date);

API Navigation

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