I have 2 "timestamp" columns in a table, in a Postgres database. I need to extract the difference in days between these 2 columns. Let's consider the columns are "column1" and "column2". And the difference between these 2 timestamps is 10 hours. So, for the query:
select column2 - column1 from table
The result is of "interval" type, and it is "10:00:00". I need to convert this in a real number, and, for this example, to obtain the result as something like "0.41666...7"
I need to convert this in a real numberI am not sure what you mean? For example what would be the value for 10:32:41?