March 14th, 2013, 08:19 AM
SQL dateFormat Query
I have a sql query which returns me the start and end time of certain process, i just need another output being displayed beside, which gives me the difference of end time and start time, im able to do that by just subtracting end time minus start time, but the difference returns me null.
i have pasted the query below,
select PROCESS.START_TIME, PROCESS.END_TIME, (PROCESS.END_TIME-PROCESS.START_TIME)As Difference from DOCKETS_PUB.PROCESS
this difference column returns me null, im doing this in a dbvisualizer.
Any help on this would be appreciated.
March 14th, 2013, 09:23 AM
what are the datatypes of those two columns? DATE? DATETIME? TIMESTAMP? INTEGER?
how do you want the difference shown? in minutes? days? fractions of a year?
and what's wrong with doing the calculation in your front-end app?