Select to view content in your preferred language

Change time in datetime field using Arcade or SQL

337
1
07-31-2023 01:27 PM
Labels (1)
GISAdmin7
Occasional Contributor

I have a field with thousands of dates formatted like this: 11/12/2000 7:30:00 PM. I need to convert the time in each to 12:00:00 PM while leaving the date unchanged.

 

I can do this using Python like: !DateField!.replace(hour=12, minute=0, second=0). ArcGIS Online limits calculations to only Arcade or SQL. 

How can I change the times in AGOL?

1 Reply
JakeSkinner
Esri Esteemed Contributor

@GISAdmin7 ,

Do you have access to ArcGIS Pro?  If so, you can add the feature service and use the python expression you have above in the Calculate Field tool.