sukesh75
5th September 2006, 09:08
Hey there,
What format is the timestamp figure that comes in various tables in Baan4c4 (wherver its applicable), stored as(seconds?). Can anyone tell me why is it different from the format in ttaad510(Display Job History) table?? Baan shows two different figures for the same time when this job history table was compared with tdinv700 table(for e.g). Apart from that why would there be a difference in Datatype for time in tdinv700(long) and ttaad510(integer).

Purpose: Need to find the duration of my jobs(difference of execution & termination time)...

sk

shah_bs
5th September 2006, 15:48
You have probably figured out by now, but here goes: The job tables store the time as (hours times 100 + minutes): so, 17:11 is stored as 1711. Since the max is 2359, it is well within the limits of 'integer'.

The other tables store time as seconds from midnight. Therefore, 'long' datatype.

sukesh75
5th September 2006, 18:13
Thats what i thought initially when i looked into the Jobs table but i realized the Job startup time mentioned in the session (Maintains Jobs) doesnt relate with the Execution time in the table.
For eg. I have a job which does Cost Price calculation that is being run daily at around 8:30pm..religiously(i mean this time doesnt get changed)
But when i looked into the table the field Execution time showed 1605 which according to your explanation should be 4:05pm. So how does a job which starts at 8pm has an execution time of 4:05pm(1605) instead of (2030)?


sk

shah_bs
5th September 2006, 19:52
Assuming that you are talking about comparing the time near the field 'Last Execution Date' in Job Data with the time near the field 'Execution Date' in Display Job History: I have checked a few of the jobs in my system and the time always match with the first record in the history table. It can be different for subsequent records, because different sessions take different times.

Make sure you are looking at the history record that matches the last execution DATE - it is possible that once upon a time the job did run at a different time and then the job data was updated subsequently.

sukesh75
6th September 2006, 14:08
Well i checked the tables again and i noticed a recurring habit of the time stored in the tables. All of them were exactly 4hours minus the time of execution.
i.e: If the job ran at 830pm, the stored value in the table is 1630 instead of 2030.

A little more thought into this made me arrive at a weird reason. I am situated in a country that GMT+4 when it comes to regional settings. Could this be why all the time is stored 4hours minus the execution time? Could this mean that all the jobs are stored in GMT?

I am sure this is not the case. Do you have any other explanation? I checked all the jobs, even the jobs that were run yesterday. All of them are -4hours in the table.

sk

Djie-En
8th September 2006, 16:41
117852stnd or 121656stnd
Maybe this will help.

Hitesh Shah
8th September 2006, 17:44
The date /locale settings at OS level / DB level. The strange time as u guessed is the GMT .

sukesh75
9th September 2006, 07:43
Djie: Yes we have both the solutions installed. Right now we are on Service Pack 18

Hitesh: So is it true that it stores the GMT time and not the local time even when the server regional settings are set to GMT+4?? Isnt the database supposed to take the regional setup of the OS?

Thanks for the response guys!!

sk