If they're stored properly as date/time fields, you might just try a simple subtract as well.
DBs usually internally store the date/times as numbers.
The problem would be that they are in separate rows and queries are usually row-based.
You may need some stored procedure for that, or use some custom scripting, rather than the DB.
For what purpose do you need the time diff?
|