It seems, that there is no easy way to transfer the current date and time via odata to HANA. I found the following solution for my requirement:
1) Get a readable timestamp in the Python code. With readable I mean a format DD.MM.YYYY HH:MM:SS in contrast to the 13-digit unix timestamp:
timestamp = time.strftime("%d.%m.%Y %H:%M:%S", localtime(time.time()))2) Create in HANA a table with field timestamp of type varchar(23). Then create / activate the oData Service and THEN create two additional generated columns of type time and date:
It is important to activate the odata Service BEFORE the generated columns are added: These two columns DATE and TIME must not be contained in the metadata of the odata service, because otherwise the odata service would try to fill them with null values which leads to an error.
Regards,
Ingo