how to get month from date in frappe python script?
import datetime
mydate = datetime.datetime.strptime('2017-12-01', '%Y-%m-%d')
print mydate.month
>> 12
2 Likes
To get month of today date
import datetime
mydate= datetime.date.today()
print mydate.month
1 Like
and how i did it from sql builder via pypika