dbCursor.execute("""INSERT INTO FME_LOG(NAME, RUN_DATE) VALUES ('eee', datetime.datetime.now())""") is not working.
Solved
How to use current system time in Python shutdown script?
Best answer by david_r
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
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

