You've already forked lazarus-ccr
* TsWorksheet.ReadAsUTF8Text: readasdate also reads time values unless sure cell is date-only. Thanks wp for the suggestions!
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2861 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -689,11 +689,18 @@ begin
|
||||
end;
|
||||
|
||||
case ACell^.ContentType of
|
||||
|
||||
//cctFormula
|
||||
cctNumber: Result := FloatToStrNoNaN(ACell^.NumberValue);
|
||||
cctUTF8String: Result := ACell^.UTF8StringValue;
|
||||
cctDateTime: Result := SysUtils.DateToStr(ACell^.DateTimeValue);
|
||||
cctDateTime:
|
||||
begin
|
||||
Result := SysUtils.DateToStr(ACell^.DateTimeValue);
|
||||
// User can have specified custom date/time format or one of the other built
|
||||
// in formats that include time. We can't parse all of them so just return
|
||||
// time as well unless absolutely sure we only want a date
|
||||
if ACell^.NumberFormat<>nfShortDate then
|
||||
Result := Result+' ' + SysUtils.TimeToStr(ACell^.DateTimeValue);
|
||||
end;
|
||||
else
|
||||
Result := '';
|
||||
end;
|
||||
|
Reference in New Issue
Block a user