“Timestamp e DateTime Python” Respostas de código

Python DateTime to Timestamp

import datetime
now = datetime.datetime.today()
timestamp = datetime.datetime.timestamp(now)
Angry Angelfish

Timestamp e DateTime Python

from datetime import datetime

timestamp = 1545730073
dt_object = datetime.fromtimestamp(timestamp)

print("dt_object =", dt_object)
print("type(dt_object) =", type(dt_object))
Nice Narwhal

Respostas semelhantes a “Timestamp e DateTime Python”

Perguntas semelhantes a “Timestamp e DateTime Python”

Mais respostas relacionadas para “Timestamp e DateTime Python” em Python

Procure respostas de código populares por idioma

Procurar outros idiomas de código