Please see the data example in the image below...

I would like to sum the amounts separately by months and years.

How can I do this using `SUMIF` ?

My idea was very simple - to have formula for each month and for each year, like this:

```
=SUMIF(A1:A100,"2018-01-*",B1:B100)
=SUMIF(A1:A100,"2018-02-*",B1:B100)
=SUMIF(A1:A100,"2018-03-*",B1:B100)
..etc
=SUMIF(A1:A100,"2018-*",B1:B100)
=SUMIF(A1:A100,"2019-*",B1:B100)
..etc

```

But this formulas don't work. Something is wrong with the `criterion`.

So what am I doing wrong ? Am I using wildcards incorrectly ?

[Example of data that I have](https://i.stack.imgur.com/t2gWi.png)