Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to insert datetime through ODATA in Native Android App using SMP 3.0

Hi Folks,

I am struggling through inserting/updating datetime filed in MS SQL Server through OData service in my native android app.

i tried it by passing the hard code value "2015-07-05T12:00:00" but it does not work. I also tried to convert it into datetime format but no success.

Could you please help me in getting the right format for inserting datetime in my MS SQL database through OData service?

There is one more issue that when i am inserting or updating the value, the status code in response is 500 or Error. I am not getting the correct response from the server but my DB is getting updated.

I am unable to find the reason why the status code of response from server is 500 or Error? Could you please help me in this?

Thanks & Regards,

Deepak Sharma

Tags:
Former Member
Former Member replied

Hi JK,

The issue is resolved. Now, I am able to insert date and time in my SQL Server database through ODATA.

Actually i tried it using dateTime, dateTimeOffset, long and Calendar by getting its instance.

But instead of simple calendar we have to use the Gregorian Calendar. So, I used Gregorian and it worked.

Thanks for your Quick response and help.

regards,

Deepak

1 View this answer in context
Not what you were looking for? View more on this topic or Ask a question