title: Convert a timestamp to int using astype(int)
body: <p>I have the variable <code>time</code>:</p>
  <pre><code>&gt;&gt;&gt; time = pd.to_datetime(1613260800000000000)
  &gt;&gt;&gt; time
  Timestamp('2021-02-14 00:00:00')
  </code></pre>
  <p><code>time</code> is a <code>timestamp</code>. Now I want to convert <code>time</code> back to an <code>int</code> value. But <code>Timestamp</code> object has no attribute <code>astype</code>. Running the following code:</p>
  <pre><code>&gt;&gt;&gt;time.astype(int)
  
  AttributeError: 'Timestamp' object has no attribute 'astype'
  </code></pre>
  <p>I know that for a column of a dataframe I can do:</p>
  <pre><code>&gt;&gt;&gt; df['start_time'] = df['start_time'].to_timedate()
  &gt;&gt;&gt; df['start_time'] = df['start_time'].astype(int)
  </code></pre>
  <p>The second command assigns the type of the column to <code>int</code>.</p>
  <p>But I did not find a comprehensive source explaining what to do with individual <code>Timestamp</code> argument.</p>
  <p>How can I solve this issue?</p>