diff --git a/agatesql/table.py b/agatesql/table.py
index c813f30..bad725d 100644
--- a/agatesql/table.py
+++ b/agatesql/table.py
@@ -11,7 +11,7 @@ import six
 import agate
 from sqlalchemy import Column, MetaData, Table, create_engine, dialects
 from sqlalchemy.engine import Connection
-from sqlalchemy.types import BOOLEAN, DECIMAL, DATE, DATETIME, VARCHAR, Interval
+from sqlalchemy.types import BOOLEAN, DECIMAL, DATE, TIMESTAMP, VARCHAR, Interval
 from sqlalchemy.dialects.oracle import INTERVAL as ORACLE_INTERVAL
 from sqlalchemy.dialects.postgresql import INTERVAL as POSTGRES_INTERVAL
 from sqlalchemy.schema import CreateTable
@@ -21,7 +21,7 @@ SQL_TYPE_MAP = {
     agate.Boolean: BOOLEAN,
     agate.Number: DECIMAL,
     agate.Date: DATE,
-    agate.DateTime: DATETIME,
+    agate.DateTime: TIMESTAMP,
     agate.TimeDelta: None,  # See below
     agate.Text: VARCHAR
 }
@@ -167,7 +167,10 @@ def make_sql_table(table, table_name, dialect=None, db_schema=None, constraints=
             if isinstance(column.data_type, agate.Text):
                 sql_type_kwargs['length'] = table.aggregate(agate.MaxLength(column_name))
 
-            sql_column_kwargs['nullable'] = table.aggregate(agate.HasNulls(column_name))
+            # Avoid errors due to NO_ZERO_DATE.
+            # @see http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_no_zero_date
+            if not isinstance(column.data_type, agate.DateTime):
+                sql_column_kwargs['nullable'] = table.aggregate(agate.HasNulls(column_name))
 
         sql_table.append_column(make_sql_column(column_name, column, sql_type_kwargs, sql_column_kwargs))
 

DateTime columns can not be stored as DATETIME in sqlite
diff --git a/tests/test_agatesql.py b/tests/test_agatesql.py
index 46fdd1e..a270222 100644
--- a/tests/test_agatesql.py
+++ b/tests/test_agatesql.py
@@ -66,7 +66,7 @@ class TestSQL(agate.AgateTestCase):
         self.assertIn('text VARCHAR(1) NOT NULL', statement)
         self.assertIn('boolean BOOLEAN', statement)
         self.assertIn('date DATE', statement)
-        self.assertIn('datetime DATETIME', statement)
+        self.assertIn('datetime TIMESTAMP', statement)
 
     def test_make_create_table_statement_no_constraints(self):
         statement = self.table.to_sql_create_statement('test_table', constraints=False)
@@ -76,7 +76,7 @@ class TestSQL(agate.AgateTestCase):
         self.assertIn('text VARCHAR', statement)
         self.assertIn('boolean BOOLEAN', statement)
         self.assertIn('date DATE', statement)
-        self.assertIn('datetime DATETIME', statement)
+        self.assertIn('datetime TIMESTAMP', statement)
 
     def test_make_create_table_statement_with_schema(self):
         statement = self.table.to_sql_create_statement('test_table', db_schema='test_schema')
@@ -86,7 +86,7 @@ class TestSQL(agate.AgateTestCase):
         self.assertIn('text VARCHAR(1) NOT NULL', statement)
         self.assertIn('boolean BOOLEAN', statement)
         self.assertIn('date DATE', statement)
-        self.assertIn('datetime DATETIME', statement)
+        self.assertIn('datetime TIMESTAMP', statement)
 
     def test_make_create_table_statement_with_dialects(self):
         for dialect in ['mysql', 'postgresql', 'sqlite']:

pip install -e .
parse_log_pytest
requirements.txt
nose pytest
3.5
requirements-py3.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
agate==1.13.0
-e git+https://github.com/wireservice/agate-sql.git@858bf8824d906a1acd160b239a13ccc17837dd2f#egg=agate_sql
alabaster==0.7.13
attrs==22.2.0
Babel==2.11.0
certifi==2021.5.30
charset-normalizer==2.0.12
distlib==0.3.9
docutils==0.18.1
filelock==3.4.1
greenlet==2.0.2
idna==3.10
imagesize==1.4.1
importlib-metadata==4.8.3
importlib-resources==5.4.0
iniconfig==1.1.1
isodate==0.6.1
Jinja2==3.0.3
leather==0.4.0
MarkupSafe==2.0.1
nose==1.3.7
packaging==21.3
parsedatetime==2.6
platformdirs==2.4.0
pluggy==1.0.0
py==1.11.0
Pygments==2.14.0
pyparsing==3.1.4
pytest==7.0.1
python-slugify==6.1.2
pytimeparse==1.1.8
pytz==2025.2
requests==2.27.1
six==1.17.0
snowballstemmer==2.2.0
Sphinx==5.3.0
sphinx-rtd-theme==2.0.0
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jquery==4.1
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
SQLAlchemy==1.4.54
text-unidecode==1.3
toml==0.10.2
tomli==1.2.3
tox==3.28.0
typing_extensions==4.1.1
urllib3==1.26.20
virtualenv==20.17.1
zipp==3.6.0

name: agate-sql
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - agate==1.13.0
      - alabaster==0.7.13
      - attrs==22.2.0
      - babel==2.11.0
      - charset-normalizer==2.0.12
      - distlib==0.3.9
      - docutils==0.18.1
      - filelock==3.4.1
      - greenlet==2.0.2
      - idna==3.10
      - imagesize==1.4.1
      - importlib-metadata==4.8.3
      - importlib-resources==5.4.0
      - iniconfig==1.1.1
      - isodate==0.6.1
      - jinja2==3.0.3
      - leather==0.4.0
      - markupsafe==2.0.1
      - nose==1.3.7
      - packaging==21.3
      - parsedatetime==2.6
      - platformdirs==2.4.0
      - pluggy==1.0.0
      - py==1.11.0
      - pygments==2.14.0
      - pyparsing==3.1.4
      - pytest==7.0.1
      - python-slugify==6.1.2
      - pytimeparse==1.1.8
      - pytz==2025.2
      - requests==2.27.1
      - six==1.17.0
      - snowballstemmer==2.2.0
      - sphinx==5.3.0
      - sphinx-rtd-theme==2.0.0
      - sphinxcontrib-applehelp==1.0.2
      - sphinxcontrib-devhelp==1.0.2
      - sphinxcontrib-htmlhelp==2.0.0
      - sphinxcontrib-jquery==4.1
      - sphinxcontrib-jsmath==1.0.1
      - sphinxcontrib-qthelp==1.0.3
      - sphinxcontrib-serializinghtml==1.1.5
      - sqlalchemy==1.4.54
      - text-unidecode==1.3
      - toml==0.10.2
      - tomli==1.2.3
      - tox==3.28.0
      - typing-extensions==4.1.1
      - urllib3==1.26.20
      - virtualenv==20.17.1
      - zipp==3.6.0
prefix: /opt/conda/envs/agate-sql

tests/test_agatesql.py::TestSQL::test_make_create_table_statement_no_constraints tests/test_agatesql.py::TestSQL::test_make_create_table_statement_with_schema tests/test_agatesql.py::TestSQL::test_to_sql_create_statement
tests/test_agatesql.py::TestSQL::test_back_and_forth tests/test_agatesql.py::TestSQL::test_make_create_table_statement_with_dialects tests/test_agatesql.py::TestSQL::test_sql_query_aggregate tests/test_agatesql.py::TestSQL::test_sql_query_limit tests/test_agatesql.py::TestSQL::test_sql_query_select tests/test_agatesql.py::TestSQL::test_sql_query_simple
agatesql/table.py
agatesql/table.py