Advertisement
Fhernd

hora-fecha.py

Jan 19th, 2018
973
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.24 KB | None | 0 0
  1. import datetime
  2.  
  3. # Hora y fecha actuales:
  4. hora_actual = datetime.datetime.now()
  5. print(hora_actual)
  6.  
  7. print(hora_actual.year)
  8. print(hora_actual.month)
  9. print(hora_actual.day)
  10.  
  11. print()
  12.  
  13. print(hora_actual.date())
  14. print(hora_actual.time())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement