Home > Back-end >  How to realize the calculation using the software of time and accumulate
How to realize the calculation using the software of time and accumulate

Time:11-02

Delphi began after computing time, how to implement login then time written to the database, the second use, will use the time and the accumulation for the first time

CodePudding user response:

You are not already write ideas? Exits the calculation time, and collect the data in the table,

CodePudding user response:

reference 1st floor of the autumn leaves response:
to not have to write your thoughts? Exits the calculation time, and collect the data in the table,
have ideas but I can't write code Delphi foundation is not very good can you give a hand in a hurry to hand in your homework

CodePudding user response:

reference 1st floor of the autumn leaves response:
to not have to write your thoughts? Exits the calculation time, and collect the data in the table,
or you tell me what I should use the component in the database how to add

CodePudding user response:

What controls all need not, the most simple approach:
Main form started, in the event of an OnActivate write
Starttime:=now;
Application in the quit button (window exit time linkage) write
Overtime:=now;
Time:=SecondsBetween (starttime, overtime);
Writes data table, such as:
"The update data table set time=+ time";
After the success of the change, then quit;
So roughly, details in your add,



CodePudding user response:

The
cited the 4th floor of autumn leaves to
what controls all need not, the most simple practice:
Main form started, in the event of an OnActivate write
Starttime:=now;
Application in the quit button (window exit time linkage) write
Overtime:=now;
Time:=SecondsBetween (starttime, overtime);
Writes data table, such as:
"The update data table set time=+ time";
After the success of the change, then quit;
So roughly, details in your add,
ok I try

CodePudding user response:

Correction of the
1, window exit event linkage
2, time:=SecondsBetween (overtime, starttime);

CodePudding user response:

The
references to the sixth floor of the autumn leaves response:
correct
1, window exit event linkage
2, time:=SecondsBetween (overtime, starttime);
Undeclared identifier: 'starttime'

CodePudding user response:

Define a variable, make it a global variable, or make it function call, this is the basic,

CodePudding user response:

refer to the eighth floor of the autumn leaves response:
define variables, global variables, or make a function call, this is the basic,
what variable type integer and string and TDateTime don't match

CodePudding user response:

TDateTime type

CodePudding user response:

The
cited the 4th floor of autumn leaves to
what controls all need not, the most simple practice:
Main form started, in the event of an OnActivate write
Starttime:=now;
Application in the quit button (window exit time linkage) write
Overtime:=now;
Time:=SecondsBetween (starttime, overtime);
Writes data table, such as:
"The update data table set time=+ time";
After the success of the change, then quit;
So roughly, details in your add,

Too talented, to teach me!

CodePudding user response:

The
cited the 4th floor of autumn leaves to
what controls all need not, the most simple practice:
Main form started, in the event of an OnActivate write
Starttime:=now;
Application in the quit button (window exit time linkage) write
Overtime:=now;
Time:=SecondsBetween (starttime, overtime);
Writes data table, such as:
"The update data table set time=+ time";
After the success of the change, then quit;
So roughly, details in your add,


Don't write in OnActivate, should write in FormShow
  • Related