Hello,
I want to pass the current date and time into a HANA table with corresponding fields (also of SQL type date resp. time) with an oData Service. My Python code looks like this:
[...]
headers = {"Content-type":'application/json';charset='utf-8'}
timestamp = int(time.time()*1000)
...
#payload = { 'KEY':'123', 'DATE':'/Date(1354665612344)/', 'VALUE':'24'}
#payload = { 'KEY':'123', 'DATE':'/Date(timestamp)/', 'VALUE':'24' }
#payload = { 'KEY':'123', 'DATE':'???, 'TIME':'???', 'VALUE':'24'}
r = requests.post(url, data=json.dumps(payload),headers=headers,auth=auth )
[...]
However:
The first payload line with the 13-digit integer 1354665612344 works.
The second payload line with the current timestamp does NOT work, although timestamp contains also a 13-digit integer.
My wish is actually the third payload line: Can anybody help me, what has to be passed over to the oData service for the fields DATE and TIME?
What would have to be passed over, if I would use a field of SQL type timestamp in the target HANA table
Thanks,
Ingo