回答“如何在Python关闭脚本中使用当前系统时间?” https://knowledge.亚搏在线safe.com/questions/24472/how-to-use-current-system-time-in-python-shutdown.html Python关闭脚本中如何使用当前系统时间? 答案由david_r https://knowledge.亚搏在线safe.com/answers/24484/view.html

如果是Oracle,您可以使用内置的SYSDATE函数来返回当前时间戳,而不需要处理Python datetime对象:

插入fme_log(name, run_date)值('eee', sysdate)

与MS SQL Server上的SYSDATE等价的是“sysdatetime()”,而在PostgreSQL上则是“current_timestamp”。

大卫

2016年3月11日星期五08:22:35 GMT david_r