Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

convert date to integer python

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()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #convert #date #integer #python
ADD COMMENT
Topic
Name
2+7 =