You are not logged in.
Pages: 1
if i use InputDate: TDateTime i write
Result := sql + FormatUTF8('strftime("%Y", InputDate) = ?', ['%'], [y]);
but if i use Created: TTimeLog how get all records only 2015 year?
Offline
i found solution from source
{$ifdef MSWINDOWS}
procedure TTimeLogBits.Expand(out Date: TSystemTime);
begin
Date.wYear := (Value shr (6+6+5+5+4)) and 4095;
Date.wMonth := 1+(Int64Rec(Value).Lo shr (6+6+5+5)) and 15;
Date.wDay := 1+(Int64Rec(Value).Lo shr (6+6+5)) and 31;
Date.wDayOfWeek := 0;
Date.wHour := (Int64Rec(Value).Lo shr (6+6)) and 31;
Date.wMinute := (Int64Rec(Value).Lo shr 6) and 63;
Date.wSecond := Int64Rec(Value).Lo and 63;
end;
{$endif}
work solution (y must be integer)
Result := sql + FormatUTF8('(r.Created >> (6+6+5+5+4)) & 4095 = ?', [], [y]);
or if y string
Result := sql + '(r.Created >> (6+6+5+5+4)) & 4095 = ' + y;
Last edited by noobies (2015-06-18 10:11:33)
Offline
Offline
Pages: 1