I have a worksheet Movements with two fields:
mydate | amount
2009-01-01 | 10.00
2009-01-02 | 13.00
2009-02-01 | 11.00
2009-02-05 | 12.00
2
You can do it with an array formula, i put the formula in A2 and in A1, i put the month number:
=ARRAYFORMULA(SUMPRODUCT(1*(MONTH(Sheet1!$A$2:$A$6)=A1)*Sheet1!$B$2:$B$6))
See the doc in action in Google Spreadsheet
[EDIT] If you want both year and month:
=ARRAYFORMULA(SUMPRODUCT(1*(YEAR(Sheet1!$A$2:$A$8)=A2)*(MONTH(Sheet1!$A$2:$A$8)=B2)*Sheet1!$B$2:$B$8))