You are here

function views_handler_field_datetime::query in MERCI (Manage Equipment Reservations, Checkout and Inventory) 6

Same name and namespace in other branches
  1. 6.2 handlers/views_handler_field_date.inc \views_handler_field_datetime::query()
  2. 7.2 handlers/views_handler_field_date.inc \views_handler_field_datetime::query()

File

handlers/views_handler_field_date.inc, line 8

Class

views_handler_field_datetime
Views assumes dates are always Unix timestamps, so convert our DATETIME-formatted columns.

Code

function query() {
  $this
    ->ensure_my_table();
  $this->field_alias = $this->query
    ->add_field(NULL, 'UNIX_TIMESTAMP(' . $this->table_alias . '.' . $this->field . ')', $this->table_alias . '_' . $this->field);
}