[Python] Date and datetime support

Discussão em 'Python' iniciado por Stack, Junho 7, 2025.

  1. Stack

    Stack Membro Participativo

    I'm currently creating a small application with PySide to learn the basics Python and GUIs. The this is I need to store some information into a small database. The information is mostly, name of account, price, date. And I need to be able to view it in a QTableView (Exemple : total of a certain account). I've manage to do it with SQLITE3 due to the code being really ugly, I've decided to rewrite it. One thing that I coudn't get to work is to select data from the table between 2 dates chosen by the user from the QDateEdit.

    Now my question is, since I need to do some query depending on which date the user select with QDateEdit (Or any other widget better suited for this). Which database could handle the 'date' stuff easily. I might be wrong but storing date in SQLITE3 gave me a string 'yyyy-mm-dd'.

    What would be the "best" way to acheive this.

    Continue reading...

Compartilhe esta Página