start_of_month
NAME
start_of_month(): Returns first day of month of given DATETIME, as DATE object.TYPE
FunctionDESCRIPTION
Returns first day of month of given DATETIME, as DATE object (equivalent to midnight, the first second of given DATETIME's month).
SYNOPSIS
start_of_month(dt DATETIME) RETURNS DATE
Input:
- dt: a DATETIME object, from which to extract start of month.
EXAMPLES
mysql> SELECT common_schema.start_of_month('2011-03-24 11:17:08') as dt; +------------+ | dt | +------------+ | 2011-03-01 | +------------+