title: Numpy Where with date - converts date to long integer
body: <p>I want to write a condition that checks a date and returns another date.<br />
  But <code>numpy.where</code> keeps converting my date into a long integer. I looked around to try and find a solution, but I can't apply it to my situation. I'm a bit new to python.<br />
  Here is my code:</p>
  <pre><code>df = {'my_date':['1900-01-01','2021-10-01','2021-08-04']}
  df = pd.DataFrame(df)
  df['new_date'] = np.where(pd.to_datetime(df.my_date) &gt; pd.to_datetime('2022-01-01'),pd.to_datetime('1900-01-01'),pd.to_datetime(df.my_date))
  df
      my_date     new_date
  0   1900-01-01  -2208988800000000000
  1   2021-10-01  1633046400000000000
  2   2021-08-04  1628035200000000000
  </code></pre>
  <p>I don't understand what I'm doing wrong and if there is a better way to do my condition statement?</p>
  <p>Thanks</p>