Skip to content

Instantly share code, notes, and snippets.

@charlesrc019
Created November 11, 2024 15:29
Show Gist options
  • Save charlesrc019/9bc81963ca07abec0999022524b5650f to your computer and use it in GitHub Desktop.
Save charlesrc019/9bc81963ca07abec0999022524b5650f to your computer and use it in GitHub Desktop.
math_convert_epoch_to_datestamp.py
import datetime
def epoch_to_dattim(epoch_time, fmt='%Y%m%d%H%M%S'):
return int(datetime.datetime.utcfromtimestamp(int(epoch_time)).strftime(fmt))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment