from datetime import datetime
x = datetime.now()
x.toordinal()
stack overflow url: https://stackoverflow.com/questions/28154066/how-to-convert-datetime-to-integer-in-python
import datetime
dt = datetime.datetime.now()
seq = int(dt.strftime("%Y%m%d%H%M%S"))
import sys
import datetime
def main():
date = sys.argv[1]
date = datetime.datetime.strptime(date, "%Y-%m-%d").date()
print(date.toordinal())
if __name__ == "__main__":
main()