Forum: Datenbanken
Delphi
by danten,
5. Mär 2014
OK.
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)
Forum: Datenbanken
Delphi
by danten,
5. Mär 2014
Find out last week, when it started and when it ended. Return date.
Forum: Datenbanken
Delphi
by danten,
5. Mär 2014
Thank you perfect. :)
Last question: How do I know the days last week.?
start_old_week := ????? return = 24.2.2014 ?????
end_old_week := ????? return = 2.3.2014 ?????
Forum: Datenbanken
Delphi
by danten,
5. Mär 2014
:-D Thank you to all friends 8-)
function Tfrm_main.Attendant_Filter:boolean;
var
myYear,myMonth,myDay:word;
set_day, my_day,
set_week,start_week,end_week,
set_month,start_month,end_month,
day_month,
set_year, start_year,end_year:string;
begin
Forum: Datenbanken
Delphi
by danten,
3. Mär 2014
"WHEN" =>> ftDateTime
SELECT
*
FROM
ATTENDANT
WHERE
"WHEN" BETWEEN :start1 AND :end1
New Error:
Forum: Datenbanken
Delphi
by danten,
2. Mär 2014
OK, does not work example:
tab_attendant.Filter := 'WHEN >= '+QuotedStr('17.2.2014 00:00:00')+' and WHEN < '+QuotedStr('20.2.2014 00:00:00');
Forum: Datenbanken
Delphi
by danten,
2. Mär 2014
Hey, they face a new problem of filtering.
I still have the error.
Use components IBTable and join the Firebird database.
I need to filter by date.
My code:tab_attendant.Filter := 'select * from ATTENDANT where "WHEN" >= '+QuotedStr('17.2.2014 00:00:00')+' and "WHEN" < '+QuotedStr('20.2.2014 00:00:00');
Forum: Datenbanken
Delphi
by danten,
28. Feb 2014
Work, thanks :)
update attendant a set name = (select username from users where id = a.userid)
Forum: Datenbanken
Delphi
by danten,
28. Feb 2014
I need to recursively insert data from one table to another table by index (USERID =>> ID) common to both tables.
My function does not complete the operation.
function TFrm_main.Add_UserName:boolean;
var
i:Integer;
begin
ds_users.DataSet.First;
for I := 0 to ds_users.DataSet.RecordCount -1 do
begin
Application.ProcessMessages;