0

how to get the result in minutes between this two dates in oracle sql?

i forgot to mention that START_DATE is VARCHAR...

SELECT A.*, TO_CHAR(SYSDATE,'YYYY-MM-DD HH24:MI:SS') TEMP1, A.START_DATE TEMP2
FROM ORACLE_TABLE A
  • Possible duplicate of [Check if current date is between two dates Oracle SQL](http://stackoverflow.com/questions/23398632/check-if-current-date-is-between-two-dates-oracle-sql) – Frank Bryce Jan 28 '16 at 18:22
  • Oracle date subtraction gives the result in days, so subtracting one date from another will give a number value which you can then calculate the minutes from (1440 minutes in a day). You may want to ABS() the results if you aren't positive which of the two dates will be more recent. – Michael Broughton Jan 28 '16 at 18:29
  • Is `start_date` a `DATE` or a `TIMESTAMP`? –  Jan 29 '16 at 07:47
  • Possible duplicate of [Oracle - Best SELECT statement for getting the difference in minutes between two DateTime columns?](http://stackoverflow.com/questions/206222/oracle-best-select-statement-for-getting-the-difference-in-minutes-between-two) – krokodilko Jan 29 '16 at 16:48

0 Answers0