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
Reply
Rich Text Editor, editor1
Editor toolbars
Press ALT 0 for help
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.