-5

I need to get the current date but in this format:

<dd>/<mm>/<yyyy> 

Is there any method that i can use? I only found different formats and things I can't use for now. For working with python.

Rakesh
  • 4,264
  • 4
  • 32
  • 58
  • 2
    See [`datetime.date.strftime()`](https://docs.python.org/3/library/datetime.html#datetime.date.strftime) – glibdud May 02 '18 at 12:18

2 Answers2

0
import datetime 
d = datetime.datetime.today()
print (datetime.date.strftime(d, "%d/%m/%y"))
Gulzaman
  • 429
  • 3
  • 11
0

Try this:

from datetime import date
timeNow = str(datetime.now())
print(timeNow)
Hayat
  • 1,539
  • 4
  • 18
  • 32