为什么我这段代码总是提示datetimetounix未被声明?

laobalu 2005-07-15 10:11:10
function TMainForm.convertunixeproctime(rawtime: string):int64;
var
raw:tdatetime;
unixtimestamp:int64;
begin
raw:=strtodatetime(rawtime);
result:=datetimetounix(raw);
end;

不能通过编译提示
[Error] umain.pas(113): Undeclared identifier: 'datetimetounix'
这个datetimetounix明明是系统方法啊。
请问为什么?
我编的这个小程序是把通用时间格式如2005-01-12转换成unix时间戳的。
...全文
90 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
lovend 2005-07-16
  • 打赏
  • 举报
回复
帮你顶
Jumpi 2005-07-16
  • 打赏
  • 举报
回复
哈哈,看来是新手,当年俺也一样
laobalu 2005-07-15
  • 打赏
  • 举报
回复
晕,问题已经解决,忘记加 unit了。。。郁闷。才几分钟。。。

16,742

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 语言基础/算法/系统设计
社区管理员
  • 语言基础/算法/系统设计社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧