Thursday, 5 October 2017

date - How to get on python current time?

I need to have the date.
The format of the time should be 2017-01-18T07:34:35Z
I have tried this but it does not work:



import datetime
i = datetime.datetime.now()
date = %i.year "-" %i.month "-" %i.day "T" %i.hour ":" %i.minute ":" %i.second "Z"

No comments:

Post a Comment

casting - Why wasn't Tobey Maguire in The Amazing Spider-Man? - Movies & TV

In the Spider-Man franchise, Tobey Maguire is an outstanding performer as a Spider-Man and also reprised his role in the sequels Spider-Man...