Frage

I want to be able to subtract the current time from the mod_date_time field.

This is what I have so far:

SELECT * FROM PROD_TRKG_TRAN.MOD_DATE_TIME - CURRENT_TIME WHERE USER_ID = '12345' * 24 * 60 "INTERVAL IN MINUTES"

Any help?

War es hilfreich?

Lösung

If you are using Oracle, you can use the following query:

SELECT (MOD_DATE_TIME - SYSDATE) * 24 * 60
FROM PROD_TRKG_TRAN
WHERE USER_ID = '12345';
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top