Don't know what you use as your DB backend, but if you use SQL Server,
create a field that is of type DATETIME. When you append or update, use
GetDate() to return the server datetime. If you use another DB backend, you
might have to use triggers to assign the datetime, but the principle would
be the same - ie., use call a function that returns the server date and
assign that to a field.
If you use Access or Paradox, or if it is difficult to retrieve a datetime
using your DB backend, you might want to implement an SNTP server, and have
your client workstations call the server to retrieve the server time and use
that as the timestamp. Alternatively, you can use IIS on the server to
return the server time - connect to it using the net masters HTTP (TNMHTTP)
component that comes with Delphi.
Dennis.
> I'm currently developing a time recording app to be used in the factory
> environment, the DB resides in a central server with several workstations
> connect to it. The workers record their activities via the workstations.
> Some of the job items are budgeted and budgeted time can be as less as 5
> minutes, therefore the accuracy of time records are significant.
>
> Because the time settings are usually vary from wkstation to wkstation, so
> if someone started a job item from one machine and then claim it from
> another, the duration (the different between timestamp value) won't be
> accurate.
>
> I think the solution would be to use the server time for all. Could anyone
> help me on how to get timestamp from server? or any other suggestions?
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz