【问题标题】:Editing Date and Time in python through SQLite3通过 SQLite3 在 python 中编辑日期和时间
【发布时间】:2019-03-24 09:27:04
【问题描述】:

我正在 tkinter 中创建一个库系统并使用 SQLite3 作为我的数据库。我必须将日期作为系统的输入,我可以通过使用“从日期时间导入日期”获取,但在一个单元格中,我想将 7 天添加到该特定日期。 例如。如果一列显示今天的日期 24-03-2019,则另一列应显示(日期+ 7 天),即 31-03-2019。 提前致谢。

【问题讨论】:

    标签: python-3.x datetime user-interface tkinter datetimeformatinfo


    【解决方案1】:

    直接使用sqlite

    bc@hal9000:~$ sqlite3
    SQLite version 3.16.2 2017-01-06 16:32:41
    Enter ".help" for usage hints.
    Connected to a transient in-memory database.
    Use ".open FILENAME" to reopen on a persistent database.
    sqlite> SELECT date('now', '+7 days');
    2019-03-31
    

    【讨论】:

      猜你喜欢
      • 2015-01-26
      • 2023-03-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-05-24
      • 1970-01-01
      相关资源
      最近更新 更多