I am trying to figure out how to write a Openedge query where i can look back 4 hours. i have struggled with the TIME syntax before. If i understand correctly, the TIME representation in Openedge is in seconds starting from midnight. The query i am trying to write would run 4 times a day, looking back 4 hours.
Is there any way to do this using TIME? Maybe i have to write 4 different queries that only pull records starting at a specific time?
Thanks very much for any help i can get, it is greatly appreciated!
Martin
You don't describe the contents or layout of the table very well.
Yes, TIME, in Progress ABL contains the number of seconds since midnight. So 16:20 for instance is 58800 (16 * 3600 + 20 * 60).
Assuming the field in your table contains an integer representing the time you can do like this to select the records that was created up to four hours ago:
Note: perhaps you need to check create date as well? And handle midnight?
Another option might be to look at the DATETIME type. There you can do operations like adding and distracting an amount of time.