How to retrieve Year-Month without leading Zero

37 Views Asked by At

How can I create a Year Month column from a "full date" source column without the leading zero?

For instance, I need: 2023-1,2023-2,2023-3

instead of: 2023-01,2023-02,2023-03

This is the code I'm currently using:

    CONCAT(YEAR(QUOTE_DATE),'-',MONTH(QUOTE_DATE)) AS Year_Month
0

There are 0 best solutions below