Calculate today's sales amount

How can I calculate the sum of a field in a doctype for the current day?