DATE_FORMAT
returns formatted version of the datetime string passed as the first parameterSELECT
DATE_FORMAT('2022-03-25 18:24:14', '%Y-%m-%d %H:%i:%s')
In this example we only need to get month and day with underscore between the valuesSELECT
DATE_FORMAT('2022-03-25 18:24:14', '%m_%d')