Thanks Shareen, Dana, Scott, and Ruby!
I was able to get my query to behave using both Shareen's and Ruby's expressions, slightly tweaked to get me down to the seconds.
Y'all are awesome!
------------------------------
Mark Russom B.Sc. FLMI ACS
Business Systems Lead
McMaster University
------------------------------
Message from the HEUG Marketplace:------------------------------
Find, Review, and Engage with Higher Education-focused solution providers, products, and services using the
HEUG Marketplace.
------------------------------
Original Message:
Sent: 04-16-2026 01:31 PM
From: Scott Nishizaki
Subject: Elapsed Time / Timestamp Differences - Any (Easy) Expresssions?
Sorry, I am fully backward. AS is allowed in Expressions but FROM isn't, so only the SQL part of my answer is relevant.
------------------------------
Scott Nishizaki
Connected Campus Community of Practice
Developer/Analyst
Azusa Pacific University
------------------------------
Message from the HEUG Marketplace:
------------------------------
Find, Review, and Engage with Higher Education-focused solution providers, products, and services using the HEUG Marketplace.
Original Message:
Sent: 04-15-2026 01:50 PM
From: Scott Nishizaki
Subject: Elapsed Time / Timestamp Differences - Any (Easy) Expresssions?
Hey Mark,
I am assuming you're working in Oracle SQL (since PS query would reject the AS keyword). In that case, you could use an inline view like
SELECT EXTRACT(DAY FROM DIFF)*86400 + EXTRACT(HOUR FROM DIFF)*3600 + EXTRACT(MINUTE FROM DIFF)*60 + EXTRACT(SECOND FROM DIFF) "TIME_IN_SEC"FROM( SELECT (A.ENDDTTM - A.BEGINDTTM) "DIFF" FROM YOUR_RECORD A WHERE YOUR_WHERE_CLAUSE = TRUE)
In a query expression you could use the same EXTRACT logic, you'd just have to subtract the timestamps in each one.
------------------------------
Scott Nishizaki
Connected Campus Community of Practice
Developer/Analyst
Azusa Pacific University
------------------------------
Message from the HEUG Marketplace:
------------------------------
Find, Review, and Engage with Higher Education-focused solution providers, products, and services using the HEUG Marketplace.
Original Message:
Sent: 04-14-2026 11:18 AM
From: Mark Russom
Subject: Elapsed Time / Timestamp Differences - Any (Easy) Expresssions?
Hi folks!
I'm trying to determine elapsed time using the difference between two timestamps. This is the current expression I am using:
(TO_TIMESTAMP(CAST((A.ENDDTTM) AS TIMESTAMP),'YYYY-MM-DD-HH24.MI.SS.FF') - TO_TIMESTAMP(CAST((A.BEGINDTTM) AS TIMESTAMP),'YYYY-MM-DD-HH24.MI.SS.FF')) * 86400
It works most of the time, but does fail on occasion, especially if the difference is too large.
Was curious to know if anyone has anything better that works more reliably. Google has not been my friend, and AI has been equally unhelpful, so I figured I would consult RI (real intelligence).
Thanks in advance!
------------------------------
Mark Russom B.Sc. FLMI ACS
Business Systems Lead
McMaster University
------------------------------
Message from the HEUG Marketplace:
------------------------------
Find, Review, and Engage with Higher Education-focused solution providers, products, and services using the HEUG Marketplace.
------------------------------