HeXetic Posted December 17, 2008 Share Posted December 17, 2008 I'm busy writing a task management tools that functions as a time sheet. The users enters in all the details and it gets stored in a SQLite database. Two of the details that the users enters is the time they Started a task and the Time they Ended the task. What I need to do is get the amount of minutes spent on the task.For example if a user started a task at 09:00 and ended it at 10:25 I need the program to return 85 Minutes. Link to comment Share on other sites More sharing options...
Aceguy Posted December 17, 2008 Share Posted December 17, 2008 like a time & motion study, i hate them. [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock Link to comment Share on other sites More sharing options...
FireFox Posted December 17, 2008 Share Posted December 17, 2008 (edited) like a time & motion study, i hate them. Hi, Simply use Timer ;Here user start his task $Timer=TimerInit();Start to count time ;User continue his task and script can continue too ;User has finished his task ! $Difference=TimerDiff($Timer);Get difference between now and start of task Msgbox(64,"Timer","User have take : "&$Difference&" seconds for his task") Edited December 17, 2008 by FireFox Link to comment Share on other sites More sharing options...
HeXetic Posted December 17, 2008 Author Share Posted December 17, 2008 like a time & motion study, i hate them. Yeah exactly like that. Hi, Simply use Timer ;Here user start his task $Timer=TimerInit();Start to count time ;User continue his task and script can continue too ;User has finished his task ! $Difference=TimerDiff($Timer);Get difference between now and start of task Msgbox(64,"Timer","User have take : "&$Difference&" seconds for his task") This is definitely one way of doing it but I was hoping there would be some kind of function to get the amount of minutes based on what the user has already entered. Link to comment Share on other sites More sharing options...
weaponx Posted December 17, 2008 Share Posted December 17, 2008 Hi, Simply use Timer ;Here user start his task $Timer=TimerInit();Start to count time ;User continue his task and script can continue too ;User has finished his task ! $Difference=TimerDiff($Timer);Get difference between now and start of task Msgbox(64,"Timer","User have take : "&$Difference&" seconds for his task") The user will enter start and end time. You will use _DateDiff() Link to comment Share on other sites More sharing options...
HeXetic Posted December 17, 2008 Author Share Posted December 17, 2008 Thanks very much weaponx, works perfectly. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now