let them enter what they want, and translate that into seconds in the cf
code...
I use beginTime and endTime, in a web application because, I capture them
logging in, and logging out, therefore I can interpret that as begin/end
time...make sense?
you can do it either way. if you just have them put in time, convert that
to seconds, scrap the epoch time idea, you don't need to translate that if
you arent doing a automatic write of start/stop time.
and then calculate timeOnTask where userId = userid and then match that up
against actualTime
make sense?
tony
-----Original Message-----
From: Jeff Small [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 2:16 PM
To: CF-Talk
Subject: Re: Quick Question, RE: Datatype and future date/time calculation
----- Original Message -----
From: "Tony Weeg" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, March 24, 2004 1:48 PM
Subject: RE: Quick Question, RE: Datatype and future date/time calculation
> ok...
>
> I would have these tables.
>
> tasks
> ----------
> id
> allottedTime (int) [keep as seconds]
> status (int) (complete/not complete) (1 or 0)
> actualTimeSpent (int) [seconds]
> (you could write total seconds here once status is changed, or update
> this with new value plus old value to keep accruing)
> taskName (varchar)
>
> taskTimeSpent
> --------------------
> id
> beginTime (int) [seconds since jan 1 1970]
> EndTime (int) [seconds since jan 1 1970]
> taskId
> userId
>
> then you can do myriad calculations on this...using this, its very simple,
> and probably a lot could be added, but that's how id do it off the top of
my
> head.
Okay, I'm almost exactly with you, except for the "beginTime" and "EndTime".
I recommended that very way of storing time, and was told "our people only
enter in the amount of time, not start and stop". Also, if multiple people
could be assigned to a task, and perform multiple times against it, wouldn't
it be easier to just "summarize the total of taskTimeSpent.usedTime where
taskTimeSpent.taskID = tasks.id" than to keep tasks.actualTimeSpent...or at
the very least, wouldn't this calculation be how I arrived at
"actualTimeSpent"?
Jeff,
just making sure I'm keeping up.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

