strange datetime from CURRENT
Posted in 1993
Below is a list of some time stamps that I found in my database. There
are over 500,000 records in the table I took them from and most of them
appear to have correct time stamps on them.
The time stamp fields are set by accessing CURRENT. The trans_time_stamp
is the time the transaction was entered. The mod_time_stamp is the same
as the trans_time_stamp at first entry, and then is altered when a
modification is made. A record may be modified once only.
The trade_date field is set by accessing the variable TODAY.
You might notice that some of the seconds are off in many of the entries.
Also note that on 09/30/93 the trade date went in as 09/30/93 but the
transaction time and modification time are set to 1995-02-21.
Also on 09/01/1993 the trade_date is set to one date and the modification
and transaction times are set to a date far in the future.
Has anyone ever seen this before?
Nothing happened during these days to make us think the database or the
system was having trouble and all other transactions entered on these
days have normal time stamps.
There is a description of the attributes and how they are updated after
the list.
trade_date mod_time_stamp trans_time_stamp trans_type
08/19/1993 1994-12-30 09:43:24.3 1993-08-19 13:37:07.1 BR
08/19/1993 1994-12-30 09:44:25.9 1993-08-19 14:40:28.5 BR
08/19/1993 1994-12-30 09:44:39.5 1993-08-19 12:10:02.9 BR
08/19/1993 1994-12-30 09:44:92.3 1993-08-19 12:53:49.2 BR
08/19/1993 1994-12-30 09:44:'(.5 1993-08-19 13:36:06.7 BR
09/01/1993 1995-01-11 05:33:39.9 1995-01-11 05:33:39.9 S
10/07/1993 1995-02-16 14:13:02.0 1993-10-07 08:03:02.6 BR
10/07/1993 1995-02-16 14:14:48.9 1993-10-07 11:45:57.9 BR
10/07/1993 1995-02-16 14:14:;4.7 1993-10-07 10:33:03.0 BR
09/30/1993 1995-02-21 13:26:22.9 1995-02-21 13:26:22.9 A
09/30/1993 1995-02-21 13:27:)(.1 1993-10-12 09:00:09.8 BA
11/03/1993 1995-03-15 16:53:63.3 1993-11-03 14:36:30.6 BR
11/03/1993 1995-03-15 16:53:''.1 1993-11-03 12:21:21.7 BR
In TABLE transaction the attributes are defined as:
trade_date date not null,
trans_time_stamp datetime year to fraction(1) not null,
mod_time_stamp datetime year to fraction(1) not null,
trans_type char(2) not null,
The mod_time_stamp and transaction fields are updated through the
following bits of code.
This is the initial setting of the fields.
define TransRecG record like transaction.*
define timeholder like transaction.trans_time_stamp
let timeholder = CURRENT
let TransRecG.trans_time_stamp = timeholder
let TransRecG.mod_time_stamp = timeholder
insert into transaction values(TransRecG.*) # insert the new
This is how the mod_time_stamp is altered when the transaction is altered.
update transaction
set mod_time_stamp = CURRENT
where ...
I suppose a workaround would be to set a variable=CURRENT and then make
sure that the date part was equal to today.
We are running Online 4.1.ud3, r4gl 4.1.uc4, SCO Unix MPX 3.2.4
Is this fixed in 5.01 Online?