|
Spring_buck,
A true date calculation can be very involved as you have to consider leap years.
What I recommend you to do is the following:
1) Define a temp table with two datetime fields.
2) Load all your datetime fields into the table.
3) Run the following select:
SELECT datetime_from, datetime_to, datetime_to - datetime_from
FROM your_table
This solution will prove to be much quicker to implement.
|