hi all.
I have a problem with a date extraction. In a table I have a date column.
I want to take the rows in which the value of this date column is after, for example, 1 December, no matter of year.
Like EXTRACT(YEAR_MONTH FROM some_column) function do, I concatenate like this
select * from some_table where CONCAT('', MONTH(some_column), DAYOFMONTH(some_column)) > 1201;
But if I have a date like '2002-12-06' CONCAT return this --> 126 and this row is not in results. I note that I don't want to remove lead zero from the day of my date.
Can you advice me what to do.
thanks.
I have a problem with a date extraction. In a table I have a date column.
I want to take the rows in which the value of this date column is after, for example, 1 December, no matter of year.
Like EXTRACT(YEAR_MONTH FROM some_column) function do, I concatenate like this
select * from some_table where CONCAT('', MONTH(some_column), DAYOFMONTH(some_column)) > 1201;
But if I have a date like '2002-12-06' CONCAT return this --> 126 and this row is not in results. I note that I don't want to remove lead zero from the day of my date.
Can you advice me what to do.
thanks.