Converting Now() into number value

F

fishqqq

I would like the difference between two now() fields to somehow be
converted into a number value that i can then do a calculation with ,
but i am at a loss....

The manager would create a task for the user with a due date
once the user completes the task the computer would calculate the
difference between when it was due and when the user actually
completed the task -
I am going to use the difference between the two values (converted
into HRS) as the actual points the user earns for completing that
task. IE if they finish early they will get +points and if they finish
late they get -points. The idea being at the end of the month the
higher the accumulated points the better.

If the Mgr sets the due date for 2 days. How can i convert the "due
date" field to = 48hrs (which would be now() + 48hrs from now()?

Then i would need to take that new now() and somehow just convert it
into a value of 48.

then when the user finishes the task the new now() value would have to
be converted into hrs from the original start date to give a value of
how long the task took to complete (in hrs). this value would then be
subtracted from the original time allowed for the task (48hrs) which
would return either a + or - value (which i would use as the points
accumulated for that task.

any help would be greatly appreciated.

Tks
Steve
 
T

Tom van Stiphout

On Wed, 24 Mar 2010 07:29:38 -0700 (PDT), "(e-mail address removed)"

Check out the DateDiff function in Help.

-Tom.
Microsoft Access MVP
 
J

John W. Vinson

If the Mgr sets the due date for 2 days. How can i convert the "due
date" field to = 48hrs (which would be now() + 48hrs from now()?

DueDate: DateAdd("h", 48, Now())

will display a moving time 48 hours after the time the data is viewed.

You can set the value of a table field to the same expression using an Update
query or some form event.
 
F

fishqqq

On Wed, 24 Mar 2010 07:29:38 -0700 (PDT), "(e-mail address removed)"


Check out the DateDiff function in Help.

-Tom.
Microsoft Access MVP

Perfect, thanks again!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top