Balor9914
Balor9914

Reputation: 9

SQL Time difference between TIMESTAMP and TIME columns

I have 2 columns on SQL table one of them has a data type of TIMESTAMP and the other has a data type of TIME i want to find the time difference between these 2 columns. This is how my table looks.

Table

Upvotes: 0

Views: 34

Answers (1)

Gordon Linoff
Gordon Linoff

Reputation: 1271151

Doesn't subtraction work?

select sign_out - time(reg_time)

Note; This assumes that the times are on the same day (which seems reasonable in this scenario).

Upvotes: 2

Related Questions