select date_format(str_to_date('31/12/2010', '%d/%m/%Y'), '%Y%m');
or
select date_format(str_to_date('12/31/2011', '%m/%d/%Y'), '%Y%m');
hard to tell from your example
More Related Contents:
- how to delete data from table A besides the customer service and director data in table B?
- Get records with max value for each group of grouped SQL results
- Select all columns except one in MySQL?
- ERROR 1452: Cannot add or update a child row: a foreign key constraint fails
- MySQL Conditional Insert
- How to properly create composite primary keys – MYSQL
- Is there a MySQL option/feature to track history of changes to records?
- MySQL JOIN ON vs USING?
- Which is faster: multiple single INSERTs or one multiple-row INSERT?
- Using an Alias in SQL Calculations
- How to get difference between two dates in months using MySQL query?
- How to change the foreign key referential action? (behavior)
- MySQL – Control which row is returned by a group by
- Can MySQL replace multiple characters?
- Docker (Apple Silicon/M1 Preview) MySQL “no matching manifest for linux/arm64/v8 in the manifest list entries”
- Using ORDER BY and GROUP BY together
- How can VBA connect to MySQL database in Excel?
- MySQL Pivot Table Column Data as Rows
- updating columns with a sequence number mysql
- How repair corrupt xampp ‘mysql.user’ table?
- Select a column with a keyword name
- What is the MySQL query equivalent of PHP strip_tags?
- Select all months within given date span, including the ones with 0 values
- Use Composite Primary Key as Foreign Key
- MySQL – Meaning of “PRIMARY KEY”, “UNIQUE KEY” and “KEY” when used together while creating a table
- GRANT with database name wildcard in MySQL?
- Using SUM on FLOAT data
- Duplicate entry for key ‘group_key’
- SQL query with avg and group by
- How can I rebuild indexes and update stats in MySQL innoDB?