通过时间戳计算对应时间:
//1328834615就是1970年1月1日 8:00:00到2012年2月10日8:43:35经过的秒数
const
sDate = '1970-1-1 08:00:00';
begin
ShowMessage(FormatDateTime('YYYY年MM月DD日HH:NN:SS', IncSecond(StrToDateTime(sDate), 1334845106)));
end;
获取时间戳:
var
a:Integer;
begin
a:=Trunc((Now-StrToDateTime( '1970-01-01 '))*24*3600);
end;
本文标题: | [DELPHI] 时间戳的问题 |
本文链接: (转载请附上本文链接) | http://vulsee.com/archives/vulsee_2012/0419_754.html |