Is there any way to query date
and get timestamp
instead of datetime.datetime
object in sqlalchemy using python 2.7?
Asked
Active
Viewed 204 times
0

Omar
- 309
- 5
- 17
-
1Does this answer your question? [Convert datetime to unix timestamp in SQLAlchemy model before executing query?](https://stackoverflow.com/questions/38357352/convert-datetime-to-unix-timestamp-in-sqlalchemy-model-before-executing-query) – rfkortekaas Mar 11 '21 at 12:52
-
? `dt = datetime.datetime(2021, 3, 11) dt.timestamp() 1615449600` – Adrian Klaver Mar 11 '21 at 15:15
-
I'm getting an Attribute Error. – Omar Mar 11 '21 at 15:34
-
You will need to show the code you are running to get a useful answer. Please include it as an UPDATE to your original question. – Adrian Klaver Mar 11 '21 at 18:04