<p dir="auto">This works:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; pd.to_datetime(1, unit='D')
Timestamp('1970-01-02 00:00:00')"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; pd.to_datetime(1, unit='D')
Timestamp('1970-01-02 00:00:00')
</code></pre></div>
<p dir="auto">However, the following gives incorrect output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; pd.to_datetime(1, unit='D', errors='coerce')
NaT"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; pd.to_datetime(1, unit='D', errors='coerce')
NaT
</code></pre></div>
<h4 dir="auto">Details of Configuration:</h4>
<p dir="auto">python: 2.7.11.final.0<br>
python-bits: 64<br>
OS: Windows<br>
OS-release: 10<br>
machine: AMD64<br>
processor: Intel64 Family 6 Model 61 Stepping 4, GenuineIntel<br>
byteorder: little<br>
LC_ALL: None<br>
LANG: None</p>
<p dir="auto">pandas: 0.18.0<br>
nose: 1.3.7<br>
pip: 8.1.1<br>
setuptools: 20.3<br>
Cython: 0.23.4<br>
numpy: 1.10.4<br>
scipy: 0.17.0<br>
statsmodels: 0.6.1<br>
xarray: None<br>
IPython: 4.1.2<br>
sphinx: 1.3.5<br>
patsy: 0.4.0<br>
dateutil: 2.5.1<br>
pytz: 2016.2<br>
blosc: None<br>
bottleneck: 1.0.0<br>
tables: 3.2.2<br>
numexpr: 2.5<br>
matplotlib: 1.5.1<br>
openpyxl: 2.3.2<br>
xlrd: 0.9.4<br>
xlwt: 1.0.0<br>
xlsxwriter: 0.8.4<br>
lxml: 3.6.0<br>
bs4: 4.4.1<br>
html5lib: None<br>
httplib2: None<br>
apiclient: None<br>
sqlalchemy: 1.0.12<br>
pymysql: None<br>
psycopg2: None<br>
jinja2: 2.8<br>
boto: 2.39.0</p>
<p dir="auto">xref <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="120416618" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/11760" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/11760/hovercard" href="https://github.com/pandas-dev/pandas/issues/11760">#11760</a></p>
<p dir="auto">Parsing unix epoch timestamps give NaT with <code class="notranslate">errors='coerce'</code> while they can be parsed correctly without it:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; pd.to_datetime(1420043460, errors='coerce', unit='s')
NaT
&gt;&gt;&gt; pd.to_datetime(1420043460, unit='s')
Timestamp('2014-12-31 16:31:00')"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">pd</span>.<span class="pl-en">to_datetime</span>(<span class="pl-c1">1420043460</span>, <span class="pl-s1">errors</span><span class="pl-c1">=</span><span class="pl-s">'coerce'</span>, <span class="pl-s1">unit</span><span class="pl-c1">=</span><span class="pl-s">'s'</span>)
<span class="pl-v">NaT</span>
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">pd</span>.<span class="pl-en">to_datetime</span>(<span class="pl-c1">1420043460</span>, <span class="pl-s1">unit</span><span class="pl-c1">=</span><span class="pl-s">'s'</span>)
<span class="pl-v">Timestamp</span>(<span class="pl-s">'2014-12-31 16:31:00'</span>)</pre></div>
<p dir="auto">pandas: 0.17.1<br>
numpy: 1.10.1<br>
Python 2.7.7</p>