Hi i am using drupal services 3 module. Every thing is perfect except updating date field. I tried many ways to update that field but didn't get any solution. Is any core issue related to date field?

  • Please add everything you've actually tried into the question, including code. Also add in all of the error messages you've received, what steps you've taken to debug the issue yourself, and what problems you've found there. It's impossible for us to debug your Drupal installation from here, so you'll need to add a lot more detail to your question if it's to be useful to future visitors, and subsequently remain open. If this is a bug report you need to take it to the Services module issue queue, we can't accept bug reports here. Thanks :) – Clive Mar 19 '13 at 15:10
  • I will update the code ASAP. – Sachin T Mar 19 '13 at 15:12
  • Thanks. To preempt that - no, there's no general problem with services and date fields, I use them all the time – Clive Mar 19 '13 at 15:19
  • @Clive, i am facing issues with date field too. they never get saved. – niksmac Mar 19 '13 at 15:20
  • @NikhilM Interesting, like I say I've never had a problem. I've literally just run one as a test and it worked fine... – Clive Mar 19 '13 at 15:22

it depends on the field widget how you submit your values for the service. For instance when you have a date field (datetime) with a select/dropdown widget, the form of the value should be the following:

"field_date":{"und":[{"value":{"month":"3","year":"2013","day":"6","hour":"0","minute":"0","second":"0"}}]},
  • 2
    Or for datetime picker... "field_date": { "und": [ { "value": { "date": "07/16/2013", "time": "11:14am" } } ] }, – Brent Jul 16 '13 at 22:01
  • @30equals, your answer helped me determine what values to send via a URL data string, thanks! For example, "&node[field_date][und][0][value][year]=2013", works for a 'Date' field type that uses a 'Select list' widget and a 'Year' granularity. – tyler.frankenstein Nov 20 '13 at 5:14
  • @30equals, Can I post a timestamp format to drupal via android device? – TangMonk Mar 23 '14 at 12:01

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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