sql - Time apart in PostgreSQL -


How can I run the following query in PostgreSQL (The following should work on MSSQL) The purpose of this is to see that How much time has been done:

  select ABS (CAST ((a.timefield -b.timefield) INT)) on B (a.id = b.id);    

"a.timefield" and "b.timefield" depending on the type of work :

  SELECT ABS (EXTRACT (EPOCH FROM (a.timefield -b.timefield))) Join "In addition to the time" to INNER (a.id = b.id));    

Comments