Thema
:
Delphi
Filtering two IBTable and insert or edit IBTable
Einzelnen Beitrag anzeigen
danten
Registriert seit: 19. Feb 2012
Ort: Czech Republic, Prag
126 Beiträge
Delphi 10.1 Berlin Architect
#
22
AW: Filtering two IBTable and insert or edit IBTable
5. Mär 2014, 17:18
OK.
zusammenfalten
·
markieren
Delphi-Quellcode:
var
sod: TDateTime;
set_week,start_week,end_week, set_old_week, start_old_week, end_old_week,sec:
string
;
begin
(* Filter week *)
start_week := IntToStr(dayofweek(now -1))+'
.
'+ IntToStr(myMonth)+'
.
'+IntToStr(myYear);
end_week := IntToStr(dayofweek(now -1)+7)+'
.
'+ IntToStr(myMonth)+'
.
'+IntToStr(myYear);
set_week := '
("WHEN" >=
' + QuotedStr(start_week)
+ '
) and ("WHEN" <=
' + QuotedStr(end_week)
+ '
)
';
(* Filter old week *)
sod := StrToDate(start_week) -7;
sec := DateToStr(sod);
start_old_week := sec;
end_old_week := start_week;
set_old_week := '
("WHEN" >=
' + QuotedStr(start_old_week)
+ '
) and ("WHEN" <=
' + QuotedStr(end_old_week)
+ '
)
';
.................
Daniel
Zitat
danten
Öffentliches Profil ansehen
Besuche die Homepage von danten!
Mehr Beiträge von danten finden