怎样判断一个日期有否有效?(15分)

清嘴

Unregistered / Unconfirmed
GUEST, unregistred user!
怎样判断一个日期有否有效?
 
IsDateTime
 
好像没有这个函数?(不好意思刚学DELPHI)
 
好心的人来帮帮忙
 
TryStrToDate(),来亲个嘴
 
try
date:=strtodate(datetostr(date))
except
end;
 
IsDateTime 是sql 里的函数
 
//判断日期时间部分是否为正确的日期时间格式
function TFrmMain.IsDateTime(strDateTime:string):boolean;
begin
try
StrToDate(strDateTime);
Result:=True;
except
Result:=False;
end;
end;
 
日期就是double,要看你怎么个有效法了。
 
不要了,男女授受不亲!
:)
 
偶是男的,你也是男的,没有以上问题。
要不清清嘴也可以。;-)
 
顶部