Ignore:
Timestamp:
Mar 22, 2018, 7:59:13 PM (7 years ago)
Author:
chronos
Message:
  • Added: Support for item references.
  • Added: Data and Time value types.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/CoolWeb/Persistence/USqlDatabase.pas

    r12 r14  
    149149  TimeParts: TListString;
    150150begin
     151  if Value = '' then Result := 0 else
    151152  try
    152153    Parts := TListString.Create;
     
    156157    Parts.Explode(Value, ' ', StrToStr);
    157158    DateParts.Explode(Parts[0], '-', StrToStr);
     159    if (StrToInt(DateParts[0]) = 0) or (StrToInt(DateParts[1]) = 0) or
     160    (StrToInt(DateParts[2]) = 0) then Result := 0 else
    158161    Result := EncodeDate(StrToInt(DateParts[0]), StrToInt(DateParts[1]),
    159162      StrToInt(DateParts[2]));
Note: See TracChangeset for help on using the changeset viewer.