Use Python Get Date, Output in format YY-MM-DD

     Get Today first

     import datetime
     today = datetime.date.today()


    Then get a delta time


     oneday = datetime.timedelta(days=1)


    Add them together, we got tomorrow


     today+=oneday


   print it


     print today.strftime("%Y-%m-%d")


   Over!

0 评论: