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?

有帮助吗?

解决方案

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';
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top