Subject isc_encode_timestamp and milliseconds
Author lintao_nz
Hi all,

I am using Delphi with Firebird 2.1. And I try to use
isc_encode_timestamp to pass milliseconds to the database.

Here is the Delphi procedure declaration:

procedure isc_encode_timestamp(tm_date : PCTimeStructure; ib_timestamp
: PISC_TIMESTAMP);

{ C Date/Time Structure }
TCTimeStructure = record
tm_sec : integer; { Seconds }
tm_min : integer; { Minutes }
tm_hour : integer; { Hour (0--23) }
tm_mday : integer; { Day of month (1--31) }
tm_mon : integer; { Month (0--11) }
tm_year : integer; { Year (calendar year minus 1900) }
tm_wday : integer; { Weekday (0--6) Sunday = 0) }
tm_yday : integer; { Day of year (0--365) }
tm_isdst : integer; { 0 if daylight savings time is not in effect) }
end;
PCTimeStructure = ^TCTimeStructure;


ISC_DATE = Long;
PISC_DATE = ^ISC_DATE;
ISC_TIME = ULong;
PISC_TIME = ^ISC_TIME;
TISC_TIMESTAMP = record
timestamp_date: ISC_DATE;
timestamp_time: ISC_TIME;
end;
PISC_TIMESTAMP = ^TISC_TIMESTAMP;

===============================================

The problem is PCTimeStructure cannot hold milliseconds value, and I
cannot find any C source code sample show me how to send milliseconds
back to the database.

Any suggestion?

Cheers,

Tao