问题已经解决,多谢yellowyellow参与,分都给你了
function convertDateToCtime(cur_time:double):integer;
var
cur_date: real;
constdate: real;
r_i:integer;
r_v:variant;
begin
constdate:=double(encodedatetime(1970,1,1,1,0,0,0));
cur_date:=double(cur_time);
cur_date:=cur_date-constdate+5/24;
r_v:=cur_date*86400-43200;
r_i:=r_v;
Result:=r_i;
end;
取得整值后,再转存入4位字节,补0够8位就可以了