Changeset 15 for trunk/Packages


Ignore:
Timestamp:
Nov 15, 2012, 12:34:33 PM (12 years ago)
Author:
chronos
Message:
  • Upraveno: Doplněno zobrazení formuláře pro úpravu všech tabulek docházky.
File:
1 edited

Legend:

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

    r4 r15  
    9090  function MySQLStrToFloat(S: string): Real;
    9191  function SQLToDateTime(Value: string): TDateTime;
     92  function SQLToTime(Value: string): TDateTime;
    9293  function DateTimeToSQL(Value: TDateTime): string;
    9394
     
    175176end;
    176177
     178function SQLToTime(Value: string): TDateTime;
     179var
     180  TimeParts: TListString;
     181begin
     182  try
     183    TimeParts := TListString.Create;
     184    TimeParts.Explode(Value, ':', StrToStr);
     185    Result := Result + EncodeTime(StrToInt(TimeParts[0]), StrToInt(TimeParts[1]),
     186      StrToInt(TimeParts[2]), 0);
     187  finally
     188    TimeParts.Free;
     189  end;
     190end;
     191
    177192{ TSqlDatabase }
    178193
Note: See TracChangeset for help on using the changeset viewer.