Well...shut my mouth...this does what I want it to do:

SELECT TMSTNO, char(TMADTE) as AddDate, char(TMAPNO) as AppNum,
tmadtm as AddTime, tmuptm as UpdTime , TIMESTAMPDIFF(8, cast(tmuptm
- tmadtm as char(22))) as Hours FROM tcscmnp WHERE current_date -
30 days <= date(TMADTM)

Thanks!

On Nov 16, 2007 2:22 PM, Michael Ryan <michaelrtr@xxxxxxxxx> wrote:
I see the TMESTAMPDIFF function in V5R4, but I'm on V5R3. Anyone know
how I can get the difference in hours between two timestamps in SQL?
I'd rather not write an RPG program, but it may take less time.

Thanks!


This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.