Adding or Substractint to a current value

K

kikeman

Hi,

I have a table with a column "Hrs" that is a double type.

I would like to add or substract hours to the current value with a single
UPDATE command. i.e:

Orders Hrs
Q6E4D3 2.5

I would need to add 3.5 hrs:

Orders Hrs
Q6E4D3 6.0

What would be the SQL UPDATE command to do this?

Thanks,
kikeman.
 
D

Douglas J. Steele

UPDATE MyTable
SET Hrs = DateAdd("n", 210, [Hrs])

will add 210 minutes (3.5 hours)
 

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