I need to select values from a Database where I have a complete Date. Now I have to get this Date without the Day because I have to group and count them per Month.
I did it like this, but this will get me the Month like for January with 1 and I need 01...
(extract(YEAR,Month from ak.date ) || '.' ||extract(Month from ak.date) ) as Datum
Use the TO_CHAR
function for this:
TO_CHAR(ak.date, 'YYYY.MM') as Datum
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With