ORM
Model Tokens
has a field that is the creation time, as follows:
create_time = db.Column(db.DateTime, nullable=False, default=datetime.now)
Screenshot in the database:
stackoverflow
cast
:
db.cast(t.create_time, db.DATE)
print
:
alone print (type (db.cast (t.createtimetime, db.DATE)
, the result is < class" sqlalchemy.sql.elements.Cast" >
, regardless of the type of result produced by db.cast
, db.cast (t.createtimetime, db.DATE) = = db.cast (current_time.) Db.Date) should all the results of
be True or False
?