function DateSqlInterface::getDateField
Same name in other branches
- 9 core/modules/views/src/Plugin/views/query/DateSqlInterface.php \Drupal\views\Plugin\views\query\DateSqlInterface::getDateField()
- 10 core/modules/views/src/Plugin/views/query/DateSqlInterface.php \Drupal\views\Plugin\views\query\DateSqlInterface::getDateField()
- 11.x core/modules/views/src/Plugin/views/query/DateSqlInterface.php \Drupal\views\Plugin\views\query\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\queryCode
public function getDateField($field, $string_date);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.