Jump to content

Calculating Minutes Spent


HeXetic
 Share

Recommended Posts

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

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 by FireFox
Link to comment
Share on other sites

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...