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

Breadcrumb

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

function PostgresqlDateSql::getDateFormat

Overrides DateSqlInterface::getDateFormat

File

core/modules/views/src/Plugin/views/query/PostgresqlDateSql.php, line 77

Class

PostgresqlDateSql
PostgreSQL-specific date handling.

Namespace

Drupal\views\Plugin\views\query

Code

public function getDateFormat($field, $format) {
    $format = strtr($format, static::$replace);
    return "TO_CHAR({$field}, '{$format}')";
}

API Navigation

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