0

Here I am getting 200 response but the date field over here is not getting updated.

The node is getting created and other fields are getting updated, only this date field is not getting created.

the error which iam getting enter image description here The Json and content type format is below:

"field_date_of_cage_card_creation": {
        "und": [
            {
                 "date":"17 Dec 2018",
                  "time":"02:45 pm",

                "timezone": "Asia/Kolkata",
                "timezone_db": "Asia/Kolkata",
                "date_type": "datetime"


            }
        ]
    },

enter image description here

enter image description here

8
  • Check with timestamp rather than date and time.
    – Ajay Reddy
    Commented May 4, 2018 at 11:38
  • @AjayReddy can you please tell me the format
    – Madhu Nair
    Commented May 4, 2018 at 11:39
  • strtotime("17 Dec 2018 02:45 pm"); it will give timestamp as "1545038100" and pass this timestamp in date value.
    – Ajay Reddy
    Commented May 4, 2018 at 11:46
  • @AjayReddy this wont work as the service is created via content type so need to pass in some other way
    – Madhu Nair
    Commented May 4, 2018 at 14:06
  • @AjayReddy i tried your way not workin
    – Madhu Nair
    Commented May 4, 2018 at 14:08

1 Answer 1

0

You should be adding your date in the value property and not including a time.

"field_date_of_cage_card_creation": {
    "und": [
        {
            "value":"17 Dec 2018",
            // or maybe
            "value":"2018-12-17",
            "timezone": "Asia/Kolkata",
            "timezone_db": "Asia/Kolkata",
            "date_type": "datetime"
        }
    ]
},

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.