TimestampDiff
extends FunctionNode
in package
Usage: TIMESTAMPDIFF(unit, expr1, expr2)
Returns expr2 – expr1, where expr1 and expr2 are date or datetime expressions. One expression may be a date and the other a datetime; a date value is treated as a datetime having the time part '00:00:00' where necessary. The unit for the result (an integer) is given by the unit argument, which should be one of the following values: FRAC_SECOND (microseconds), SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, QUARTER, or YEAR.
Tags
Table of Contents
Properties
- $firstDatetimeExpression : mixed
- $secondDatetimeExpression : mixed
- $unit : mixed
Methods
Properties
$firstDatetimeExpression
public
mixed
$firstDatetimeExpression
= null
$secondDatetimeExpression
public
mixed
$secondDatetimeExpression
= null
$unit
public
mixed
$unit
= null
Methods
getSql()
public
getSql(SqlWalker $sql_walker) : mixed
Parameters
- $sql_walker : SqlWalker
parse()
public
parse(Parser $parser) : mixed
Parameters
- $parser : Parser