This question is in regards to both using the ArcGIS Portal GUI and the ArcGIS API for Python.
I'm able to create a hosted feature service from a GeoJSON, but I'm unable to create esriFieldTypeDate fields. All date formats in the geojson properties lead to esriFieldTypeString field types. I don't have this issue when publishing from a csv.
I understand that I can delete the fields and add new ones in. But it would help our workflow to immediately declare the field type.
Here's what I do programmatically...
layer.manager.delete_from_definition({
"fields": [{"name": "created_at"}]
})
layer.manager.add_to_definition({
"fields": [{
"name": "created_at",
"type": "esriFieldTypeDate",
"alias": "Created At"]
Just wondering if this is a bug when working with geojsons or if I'm not formatting my dates correctly.