dbCursor.execute("""INSERT INTO FME_LOG(NAME, RUN_DATE) VALUES ('eee', datetime.datetime.now())""") is not working.
Page 1 / 1
Hi
If it's Oracle, you can use the built-in SYSDATE function to return the current timestamp without having to wrestle with Python datetime objects:
insert into fme_log(name, run_date) values ('eee', sysdate)
The equivalent to SYSDATE on MS SQL Server is "sysdatetime()" and on PostgreSQL it is "current_timestamp".
David
Hi
If it's Oracle, you can use the built-in SYSDATE function to return the current timestamp without having to wrestle with Python datetime objects:
insert into fme_log(name, run_date) values ('eee', sysdate)
The equivalent to SYSDATE on MS SQL Server is "sysdatetime()" and on PostgreSQL it is "current_timestamp".
David
Note that sysdate is the timestamp of the database server. This might be different from the timestamp of the client where you're running FME, which is the timestamp Python would give you. Sysdate is probably the one you want though.