Select to view content in your preferred language

Dates don't follow correct time order after join

429
1
02-27-2023 04:53 AM
Labels (1)
Alice
by
Emerging Contributor

Hello!

I want to join a csv. with a feature layer. To do this I create a relationship class (one to many) and then do the join. Unfortunatly, after the join my dates don't follow the correct time order. First comes values from 2021 then 2022, then a few from 2023, starts again with 2022 , then 2021 and ends with 2023.

I use a Python Toolbox to do this. The datatype of my date is date. I don't use the column to do the join. All other columns are correct.

Does anyone know the answer?

 

Here is a snippet of my code:

arcpy.management.CreateRelationshipClass("Probeentnahmepunkte_Gao_export","Abwasser",f"{gdbPath}\Relationclass", "SIMPLE", "Abwasser","Probeentnahmepunkte_Gao_export", "NONE", "ONE_TO_MANY","NONE","probeentna", "Probeentnahmestelle", '', '')

arcpy.management.AddJoin("Probeentnahmepunkte_Gao_export", "probeentna", "Abwasser", "Probeentnahmestelle", "KEEP_ALL")

Screenshot (9).png

 

0 Kudos
1 Reply
DavidPike
MVP Notable Contributor

I don't know if I'm missing something, why are your creating a relationship class before the join?

What are you expecting with the date order?  There's some missing context here for understanding.

0 Kudos