#Python Convert datetime to Unix Epoch Timestamp

There doesn’t seem to be a way to get a Unix timestamp directly from a datetime object in Python, the best workaround example I could find is:


This gets the timestamp as a string, it seems a bit long winded, so if anybody knows a better way please let me know!

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *