fpspreadsheet: Adds a forgotten part for date/time support

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2264 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
sekelsenmat
2012-01-23 13:52:43 +00:00
parent 09153c582d
commit 624d9b3283

View File

@ -652,8 +652,21 @@ end;
@return True if the cell is a datetime value, false otherwise
}
function TsWorksheet.ReadAsDateTime(ARow, ACol: Cardinal; out AResult: TDateTime): Boolean;
var
ACell: PCell;
Str: string;
begin
ACell := FindCell(ARow, ACol);
if (ACell = nil) or (ACell^.ContentType <> cctDateTime) then
begin
AResult := 0;
Result := False;
Exit;
end;
AResult := ACell^.DateTimeValue;
Result := True;
end;
{@@