Time Field?

linuxdawg

New Member
Hi, all! Have a quick question that maybe someone out there can shed some light on. I have a progress 91d db that we use to house MRP data. Anyway, there is a table within the db "tr_hist" that I'm most interested in. There is a field, tr_time within "tr_hist" that stores time format in a wierd way. When I order by "tr_time" the pattern looks like this:

tr_time
612
626
1,212
1,812
1,825
1,839
etc....

The query I pulled is supposed to only pull data created on 1 date. After examining the results, my first inclination was "minutes since midnight", but that doesn't look right. 85,813 is the last time entry that I have for this date. There are 1440 minutes in a day, so that rules out the minutes theory. I then proceeded to look at seconds since midnight. Since there are 86,400 seconds in a day, it appears that this is the format? So, am I right with this thinking? Do you guys agree with me on the seconds theory?

TIA!
 
I agree with you.

Most likely the original field was filled using the TIME function. Progress only has a DATE-TIME type since OE 10.

I suspect you have a date field in the table, or it's parent, also.


[From Help]

TIME Function

Returns the number of seconds since midnight. Use this function together with the STRING function to produce the time in hours, minutes, and seconds.

SYNTAX

TIME
 
So I would imagine the original program (assuming it was 4GL) would have created each record along the following lines:

CREATE tr_hist.

ASSIGN tr_hist.<whatever>
:
tr_hist.tr_time = TIME
:
.

Your record then is timestamped.
 
So, am I right with this thinking? Do you guys agree with me on the seconds theory?

Looks like that. To check it try to convert these numbers into strings:

Code:
FOR EACH tr_hist NO-LOCK:
    DISP STRING(tr_hist.tr_time,"HH:MM:SS").
END.

HTH
 
Back
Top