User Tools

Site Tools


informatica:linux:python

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
informatica:linux:python [2022/10/25 21:27] joseinformatica:linux:python [2022/10/25 21:39] (current) – [Fecha (python 3)] jose
Line 23: Line 23:
 print(r.text) print(r.text)
 </code> </code>
-====== Fecha (python 3) ======+====== Fecha ====== 
 +Python 3
   import datetime   import datetime
   f"{datetime.datetime.now():%Y%m%d_%H%M%S}"   f"{datetime.datetime.now():%Y%m%d_%H%M%S}"
      
   '20191015_212507'   '20191015_212507'
-  +Python 2 
 +  from datetime import datetime
  
 +  fecha = datetime.now() 
 +  print(fecha.strftime("%Y/%m/%d_%H:%M:%S"))
  
informatica/linux/python.txt · Last modified: 2022/10/25 21:39 by jose