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

Breadcrumb

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

function QueryPluginBase::getDateFormat

Creates cross-database date formatting.

Parameters

string $field: An appropriate query expression pointing to the date field.

string $format: A format string for the result, like 'Y-m-d H:i:s'.

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

Return value

string A string representing the field formatted as a date in the format specified by $format.

1 method overrides QueryPluginBase::getDateFormat()
Sql::getDateFormat in core/modules/views/src/Plugin/views/query/Sql.php
Creates cross-database date formatting.

File

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

Class

QueryPluginBase
Base plugin class for Views queries.

Namespace

Drupal\views\Plugin\views\query

Code

public function getDateFormat($field, $format, $string_date = FALSE) {
    return $field;
}

API Navigation

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