“Python strptime ()” Código de respuesta

strptime python



import datetime
d =datetime.datetime.strptime("01/27/2012","%m/%d/%Y").strftime('%m/%d/%Y')
print d
01/27/2012
launchable 720

strptime python

import datetime
d = datetime.datetime.strptime("01/27/2012", "%m/%d/%Y")
print(d)
output ....
2012-01-27 00:00:00
launchable 720

Python strptime ()

from datetime import datetime

date_string = "21 June, 2018"
print("date_string =", date_string)

date_object = datetime.strptime(date_string, "%d %B, %Y")
print("date_object =", date_object)
SAMER SAEID

Respuestas similares a “Python strptime ()”

Preguntas similares a “Python strptime ()”

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código