//判断是否是日期格式字符串
function IsDateStr(Value: String): Boolean;
var
Temp: TDateTime;
begin
Result := TryStrToDate(Value, Temp);
end;
function IsTheSameDate(date1,date2:String):Boolean;
begin
Result := False;
if (date1 = date2) then
begin
Result := True;
end else if (IsDateStr(date1)) then
begin
if (FormatDateTime('yyyy-mm-dd',StrToDate(date1)) = date2) then
begin
Result := True;
end;
end else if (IsDateStr(date2)) then
begin
if (FormatDateTime('yyyy-mm-dd',StrToDate(date2)) = date1) then
begin
Result := True;
end;
end;
end;