Created
November 11, 2024 15:30
-
-
Save charlesrc019/48bbdccd6b4b7f7b11ea83ae5c1387f9 to your computer and use it in GitHub Desktop.
math_convert_datestamp_to_epoch.py
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
import time | |
import calendar | |
def dattim_to_epoch(dattim, fmt='%Y%m%d%H%M'): | |
return int(calendar.timegm(time.strptime(str(dattim), fmt))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment