Get month from current date (ex: 8 from 2015-08-09)

Hi guys,

I am trying to get month based on date in query report. I used Month() function.

SELECT ALL
tabDeposits.sales_partner as “Sales partner:Link/Employee:200”,
Month(‘tabDeposits.delivery_date’) as “date:Link/Employee:200”,
sum(tabDeposits.deposit_amount) as “Deposit amount::200”
FROM
tabDeposits
GROUP BY sales_partner,MONTH(‘delivery_date’) ;

but it did not worked.
and also trying to get month from date in custom script

var d = new Date();
month = d.getMonth();

it didnt worked too… will someone please guide where i made a mistake…

thanks in advance :smile:

You missed closing parentheses ).

ohh I am sorry thats typing error here. I closed it in my code but no result…