CSV input not including time with date

03-01-2022 04:20 PM
New Contributor III


I have big script (in a python toolbox) that can take in GPS Collar data from several manufacturers and spits out a feature class for review before it is added to the main database. One of the manufacturers outputs their data in a csv. So I'm just doing a table to table conversion and then going through the rest of the script. The issue is that only the date is coming through and leaving the time for some reason. I don't think it would be too onerous to split up the column in the csv before it was imported (I have another CSV but their date and time come separated and I combine them into 1), but it seems like this shouldn't be a problem in the first place as I'm using a field calculator to just input the entire column into the feature class:

arcpy.management.CalculateField(output_path, 'UTC',
expression_type='PYTHON 3',

Also tried converting it to a string, but it seems to be losing the time when the CSV is converted to the table, but I have no idea why that would be.

The format in the CSV is:

%m/%d/%Y %H:%M:%S


0 Kudos
1 Reply
MVP Esteemed Contributor

a related thread with some suggestions

Solved: Create DateTime from separate Date and Time fields - Esri Community

... sort of retired...
0 Kudos