Select to view content in your preferred language

Importing and loading data — Convert text values to dates

371
3
10-25-2024 03:39 AM
Status: Open
Labels (1)
Bud
by
Esteemed Contributor

ArcGIS Pro 2.9.5; Oracle 18c 10.7.1 EGDB:

When importing or loading a CSV into an enterprise geodatabase standalone table:

There are dates stored as text like this in the CSV (8 date fields): [edited]

  • Nov 7, 2023, 9:55 AM
  • Sep 23, 2022, 1:11 PM
  • May 9, 2023, 6:56 AM

Right now, my current workflow to get the text into proper date fields is:

  1. Load the values into temporary text fields.
  2. Create blank date fields.
  3. Use a Python or Arcade field calculation to convert the text into dates; populate the date fields.
  4. Delete the temporary text fields.

That's cumbersome. Parsing dates using code is difficult and risky for non-experts. Instead of needing to convert text to dates using code, I'm wondering if GP tools like Table to Geodatabase could do the conversion, possibly using AI/machine learning. Right in the Table to Geodatabase or Append GP tool as a single step, not in a separate GP tool after the fact. And without explicitly defining the date format with MMM DD, YYYY, T:TT TT.

I'm inexperienced with AI/machine learning, but if systems like ChatGPT can convert a textual table to SQL INSERT statements, then I'm wondering if a similar AI mechanism in Pro could convert text to dates, too. Or maybe AI isn't needed, but it could be done automatically with functions or regular expressions within the GP tool instead.

3 Comments
SSWoodward
Status changed to: Needs Clarification

What tool are you using to transfer your data from the CSV to a standalone table?

Bud
by

@SSWoodward  Table to Geodatabase or Append 

SSWoodward
Status changed to: Open