1.20.x date_sql_handler.inc | date_sql_handler::sql_date_math($field, $direction, $count, $granularity) |
Adjusts a field value by time interval.
Parameters
string $field: The field to be adjusted.
string $direction: Either ADD or SUB.
int $count: The number of values to adjust.
string $granularity: The granularity of the adjustment, should be singular, like SECOND, MINUTE, DAY, HOUR.
File
- modules/
date/ views/ date_sql_handler.inc, line 144 - SQL helper for Date API.
Class
- date_sql_handler
- A class to manipulate date SQL.
Code
function sql_date_math($field, $direction, $count, $granularity) {
return $this->db_connection->dateMathSql($field, $direction, $count, $granularity);
}