You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

How can I create a date from year, month and day stored in a variable?

Step-by-step guide

This is how to do it in Macro and Python, respectively:

    year = 2016
    month = 8
    day = 9
    d = date(10000*year + 100*month + day)
    from datetime import datetime
    year = 2016
    month = 8
    day = 9
    d = datetime(year, month, day)




  • No labels