TST: add tests for sql datetime writing

- not working for pymysql (skipping for now)
Merge pull request #7082 from jorisvandenbossche/sql-datetime

SQL: datetime writing: add tests + issue with pymysql