mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 06:06:17 +02:00
* fcl-db: cosmetic
git-svn-id: trunk@28314 -
This commit is contained in:
parent
6e27aaebbb
commit
bd37d804fc
@ -525,19 +525,22 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
// Parses string-formatted date into TDateTime value
|
// Parses string-formatted date into TDateTime value
|
||||||
|
// Expected format: '2013-12-31 ' (without ')
|
||||||
Function ParseSQLiteDate(S : ShortString) : TDateTime;
|
Function ParseSQLiteDate(S : ShortString) : TDateTime;
|
||||||
|
|
||||||
Var
|
Var
|
||||||
Year, Month, Day : Integer;
|
Year, Month, Day : Integer;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result:=0;
|
Result:=0;
|
||||||
If TryStrToInt(NextWord(S,'-'),Year) then
|
If TryStrToInt(NextWord(S,'-'),Year) then
|
||||||
if TryStrToInt(NextWord(S,'-'),Month) then
|
if TryStrToInt(NextWord(S,'-'),Month) then
|
||||||
if TryStrToInt(NextWord(S,' '),Day) then
|
if TryStrToInt(NextWord(S,' '),Day) then
|
||||||
Result:=EncodeDate(Year,Month,Day);
|
Result:=EncodeDate(Year,Month,Day);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// Parses string-formatted time into TDateTime value
|
// Parses string-formatted time into TDateTime value
|
||||||
|
// Expected format '23:59:59.999' (without ')
|
||||||
Function ParseSQLiteTime(S : ShortString; Interval: boolean) : TDateTime;
|
Function ParseSQLiteTime(S : ShortString; Interval: boolean) : TDateTime;
|
||||||
|
|
||||||
Var
|
Var
|
||||||
|
Loading…
Reference in New Issue
Block a user