Skip to content

Instantly share code, notes, and snippets.

@charlesrc019
Created November 11, 2024 15:30
Show Gist options
  • Save charlesrc019/48bbdccd6b4b7f7b11ea83ae5c1387f9 to your computer and use it in GitHub Desktop.
Save charlesrc019/48bbdccd6b4b7f7b11ea83ae5c1387f9 to your computer and use it in GitHub Desktop.
math_convert_datestamp_to_epoch.py
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