I want to increase and decrease a DateTime column from a specific list with jquery and SPServices.

Normaly I should first receive the original datatime and then add the timespan and after that save it. But its too much I think. Is there a better possibility to add a timespan like 5 minuts to a datetime column adhoc? Maybe someone knows a little CALM query for it :)

  • I think the answer is simply no. Maybe you could reconsider your design, and calculated columns or workflows would be a better way in your case?
    – Christophe
    Commented Jan 11, 2012 at 16:36

2 Answers 2


AFAIK caml isn't offering such a functionality.

There are different ways how to achieve this. From jQuery you could use

  • Plain ASMX Services (no-one likes writing SOAP messages :D)
  • SPServices as ASMX Wrapper
  • Client Object Model (when site is hosted in SharePoint)

By using any of these technologies you're able to minimize the traffic going across the wire.

I would use SPServices or REST API.

  • Ok.. for sure i will use the SPServices, but the documentation is soooo fantastic irony Do you know any usefull tutorials or something like that?
    – Smokefoot
    Commented Jan 11, 2012 at 15:45
  • The documentation is offering some samples. They are listed on the detail pages for the ASMX methods. But Marc, the author has written a lot of articles about SPServices in daily business on his own blog. Just have a look at sympmarc.com. It's also good to have a look at the debug version of SPServices. SPServices is just regular JavaScript so it's easy to read and understand. I guess it's the best practice you could do to get a deeper knowledge of SPServices itself. Commented Jan 11, 2012 at 15:48
  • There is a lot of support on the forums of the codeplex site where Marc and other contributors are very active. It's almost better to post there than her regarding SPServices. Commented Jan 11, 2012 at 16:28

To expand on my initial comment, you could do it with 3 columns:

  1. Your original DateTime column
  2. a Timespan column
  3. a calculated column that does DateTime+Timespan

Then you could use SPServices to update Timespan, and the calculated column would automatically store the result. No need to grab the original DateTime value.

This might not work for your specific scenario, but based on the info you provided it seems like a reasonable solution

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.