Saturday 31 August 2013

Adding up numbers in custom fields on a monthly basis

Adding up numbers in custom fields on a monthly basis

Every time i help out a client with a request i make a new post on my
wordpress-site. I write a little text about what the problem was, assign
the post to the clients own specific category and i fill inn the number of
minutes it took me to accomplish the request. The number of minutes i
insert in a custom field (using the advanced custom field plugin).
Then, i bill my client on a monthly basis according to how long time i
have spent solving request.
I have accomplished to query out the number of minutes for each
request/post and add up the total number of minutes. But here comes my
problem:
I would like the query to check out which month the post was published in,
and add up totals on a monthly basis. So lets say i helped a client like
this:
JANUARY
request took me 60 minutes
request took me 30 minutes
FEBRUARY
request took me 45 minutes
request took me 15 minutes
Then i would like to query out two seperate boxes saying You spent 90
minutes on requests in january You spent 60 minutes on requests in
february
Anyone able to solve this problem for me?
Anders

No comments:

Post a Comment