Hello!
I have a table in a database where there is a column called DATE (datetime type)that logs the date/time of an event.The first index of the table it represent the start date/time and the last index of the table represent the final date/time.
How can i make a query that returns the duration between the start date/time and final date/time?
i tryed to do:
but it is not working.
Others solutions?
I have a table in a database where there is a column called DATE (datetime type)that logs the date/time of an event.The first index of the table it represent the start date/time and the last index of the table represent the final date/time.
How can i make a query that returns the duration between the start date/time and final date/time?
i tryed to do:
Code:
select DateDiff(hour,select DATE from mytable where INDEX=(select min(INDEX) from mytable),select DATE from mytable where INDEX=(select max(INDEX) from mytable)) from mytable
Others solutions?
Comment