This is a date time difference code using SQL. Quite easy to use and faster. It reduces the load you have to put on your source code and transfer it to SQL.