Possible Duplicate:
Difference between two dates in MySQL
I have three fields in a table. Date1, Date2, and DiffinHours. In our PHP code, when Date2 is set, we calculate the difference in hours between Date2 and Date1 and then set DiffinHours to that value.
However, we have a database where the calculations were not being done for some period of time, and we need to calculate DiffinHours for that time frame. I can write a script to do it, but am hoping it can be done via a query.