Maybe the time format in the OCX is defined by an integer number istead of a string holding the data like '12:30:00'. It could be the reason. Hope it is of any help <img border="0" title="" alt="" src="images/smiles/icon_smile.gif" />
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Andreas Lundin: Maybe the time format in the OCX is defined by an integer number istead of a string holding the data like '12:30:00'.<HR></BLOCKQUOTE>
I declared the variable for the return value as variant. I don't think the data type is the problem.
I think there's something special about the Object table. Reading from the 'Time' field works as long as 'Geändert' ('changed' or 'modified' in English version?) is false. Strange...
For some reason (still trying to find out), Navision sometimes stores the time property of the objects in miliseconds as well.
Try running a report wich rounds the time in the object table:
Report on Object, On after get record v_DateTime[1] := CREATEDATETIME (Date,Time);
v_DateTime[2] := ROUNDDATETIME(v_DateTime[1],1000,'=');
v_duration := v_DateTime[1] - v_DateTime[2];
IF v_duration <> 0 THEN BEGIN
Time := DT2TIME (v_DateTime[2]);
MODIFY;
end;
Be sure to check modification permission in the object permission table!
Round the time manually when changing objects and you should be fine.
Comments
Maybe the time format in the OCX is defined by an integer number istead of a string holding the data like '12:30:00'. It could be the reason. Hope it is of any help <img border="0" title="" alt="" src="images/smiles/icon_smile.gif" />
Regards
Andreas
Maybe the time format in the OCX is defined by an integer number istead of a string holding the data like '12:30:00'.<HR></BLOCKQUOTE>
I declared the variable for the return value as variant. I don't think the data type is the problem.
And that works!
Jan
typedef DBL_U32 DBL_TIME;
Time is 32 bit unsigned integer.
Try running a report wich rounds the time in the object table:
Report on Object, On after get record
v_DateTime[1] := CREATEDATETIME (Date,Time);
v_DateTime[2] := ROUNDDATETIME(v_DateTime[1],1000,'=');
v_duration := v_DateTime[1] - v_DateTime[2];
IF v_duration <> 0 THEN BEGIN
Time := DT2TIME (v_DateTime[2]);
MODIFY;
end;
Be sure to check modification permission in the object permission table!
Round the time manually when changing objects and you should be fine.