Para manejar la fecha y hora actual desde python, necesitamos importar el modulo datetime, como puedes ver en el siguiente ejemplo:
Despues le damos formato para mostrar segun Dia Mes Año.
from datetime import datetime
hoy=datetime.now()
print(hoy)
#con formato
hoy=hoy.strftime(‘%d%m%Y’)
print(hoy)
Please follow and like us: