title: Loading python datetime into Google BigQuery
body: <p>I am loading a datetime field from Pandas into a Google BigQuery DATETIME and get the following error:</p>
  <pre><code>google.api_core.exceptions.BadRequest: 400 Error while reading data, error message: Invalid datetime value 1594835746000000 for field 'my field name' of type 'INT64' (logical type 'TIMESTAMP_MICROS'): generic::out_of_range: Cannot return an invalid datetime value of 1594835746000000 microseconds relative to the Unix epoch. The range of valid datetime values is [0001-01-1 00:00:00, 9999-12-31 23:59:59.999999]
  </code></pre>
  <p>Inside Pandas the object is definitely a datetime.datetime object and has a valid date and when I take 1594835746000000 through <a href="https://www.epochconverter.com/" rel="nofollow noreferrer">https://www.epochconverter.com/</a> it returns a valid date.</p>
  <p>I am loading the data into BigQuery by way of a call:</p>
  <pre><code>job_config = bigquery.LoadJobConfig(schema = schema_fieldlist)
  job = bigquery_client.load_table_from_dataframe(df, f'{dataset}.{tablename}', job_config)
  job.result()
  </code></pre>
  <p>where
  schema_fieldlist is an array and, for the field in question, is defined as:</p>
  <pre><code>bigquery.SchemaField('my field name', 'DATETIME')
  </code></pre>
  <p>I am not doing anything clever - can anyone advise if they have got this to work and how? I have seen other questions to do with returning timestamps and the change in valid range between standard and legacy SQL dialects</p>