SQL on Date field - TechRepublic
General discussion
January 9, 2002 at 05:27 PM
lord foul

SQL on Date field

by lord foul . Updated 24 years, 5 months ago

In my DB table i record peoples Names and the Dates and Times they perform Activities. I am trying to calculate the total hours of activities between two date periods for monthly reporting. the dates are saved as dd/mm/yy format. the structure of myquery is,
Select Sum(TotalHours)
From VolunteerHours
Where Date
Between 10/10/00 and 10/11/00;
and i receive a div by 0 error.
can anyone suggest how i can calculate totals using the date fields in an SQL query.
cheers,
ghost

This discussion is locked

All Comments