fromisoformat()

fromisoformat : Return date object by taking date string in YYYY-MM-DD format .

Today's date

We used strftime()
from datetime import date
dt =date.fromisoformat(date.today().strftime('%Y-%m-%d'))
print(dt)
Output
2019-09-17
By using date string
from datetime import date
dt =date.fromisoformat('2019-09-22')
print(dt)
Output is here
2019-09-22
All Date Objects


plus2net.com



Post your comments , suggestion , error , requirements etc here




We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
©2000-2019 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer