AnsweredAssumed Answered

Preserving a MySql datetime field in Python

Question asked by jborgion Champion on Feb 13, 2020
Latest reply on Feb 14, 2020 by bharold-esristaff

I have a python script that extracts data from a MySql database and writes it to a csv.  The original table is a mix of all sorts of field types including datetime and timestamp.  Once the csv is written and I perform an an arcpy table to table to get it into a fgdb, the datetime fields automagically become text fields.  Not so good if you need to filter by date....


CSV files are both a boon and bane: is there a way to go right from MySql to a File geodatabse, thus preserving the field types?  Unfortunately I do not have admin rights to our e-gdb (Sql server back-end) so I can't go MySql to SqlServer....