PYTHON DATE TIME

Date stored in epoch starting form 1-1-1970

In [6]:
import datetime as dt

In [4]:
import time as tm

In [5]:
tm.time()


Out[5]:
1481470663.799574

In [9]:
now=dt.datetime.fromtimestamp(tm.time())

In [10]:
now.year


Out[10]:
2016

In [ ]: