Skip to content

SQLite DateTime type only accepts Python datetime and date objects as input. #42

@truongluan1202

Description

@truongluan1202

sqlalchemy.exc.StatementError: (builtins.TypeError) SQLite DateTime type only accepts Python datetime and date objects as input.
i got this error about my DateTime function was not working

This is my code use it :

data = db.Column(db.DateTime(timezone=True), default=func.now())
Can anyone fix this ? I tried use from datetime import datetime but it didn't work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions