Click here to Skip to main content
15,890,946 members
Please Sign up or sign in to vote.
1.11/5 (2 votes)
See more:
Basicly Evry 24 hours i need to calculate total work time etc from a database

SQL
ID | date       | tijd    | empoyeeID(foreighn)
1  | 2014-03-03 | 14:00:00| 0
2  | same date  | 15:00:00| 0 

...
( they are basicly registrations 1 = start 2 = stop 3= start 4 = stop)
so for every date i need the start time and stop time total time worked

should i calculate that with MySql Or c#

should i hook the internal windows time
should i use timers

what dou you guys think is the best aproach


soz bad england I aint a native english speaker ;)

ps. i have written evrything for the single registrations (see table at start of post)
Posted
Updated 3-Mar-14 2:52am
v2
Comments
Amalraj Ramesh 3-Mar-14 8:59am    
You can do this from c# code using timer control

Well, use the Thread or maybe go for Timer control of .NET.

-KR
 
Share this answer
 
Please see my past answer: Problem a Window Services[^].

—SA
 
Share this answer
 
You can create a batch file which will be control by windows scheduler. The scheduler will fire the batch file in a certain time. The batch file will fire a exe and the exe will calculate your time.
Thanks!
 
Share this answer
 
Comments
ijshockeymen 3-Mar-14 9:13am    
yes but then i have to make a whole new exe
cant i do it from within my existing prog ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900