Date format in python

Asked

Viewed 946 times

3

How to take the current date and format in Brazilian format

'28/10/2019'

1 answer

4


try this using datetime

from datetime import datetime

print(datetime.today().strftime('%d/%m/%Y'))
  • 1

    thanks, it worked

  • 2

    @Rubenborgesramos do not write solved in the title, just mark the answer as correct, the site has system to indicate what is solved so, do not need to use "manual" how to change titles ;)

  • @Rubenborgesramos glad to help agr only mark the answer as correct

Browser other questions tagged

You are not signed in. Login or sign up in order to post.