Created
December 4, 2024 09:16
-
-
Save Suhaib3100/032e8aadc1511479b66cc866f261ce91 to your computer and use it in GitHub Desktop.
Ex 3 convert readable into timestamps
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a datetime object | |
dt = datetime(2024, 12, 4, 15, 0, 0) | |
# Convert datetime to timestamp | |
timestamp = dt.timestamp() | |
print("Timestamp:", timestamp) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment