Truncate date to month | DATE_TRUNCATE_TO_MONTH
Syntax
DATE_TRUNCATE_TO_MONTH( [value = CURRENT_DATE()] )
Parameters
value
A DATE value.
If the value is not a DATE, it will be converted to one with the DATE operation.
Return Value
Returns the truncated DATEDescription
Set the day, hour, minute, seconds and milliseconds values of a DATE to 0.Examples
DATE_TRUNCATE_TO_MONTH("2017-08-30T17:36:23.700Z") # returns DATE("2017-08-01T00:00:00.000Z")