2

Based on the sample data column below, what tool I can use in ArcGIS Pro 3 to create the Year, Month and Day columns in the attribute table?

The purpose is to then use these columns to create a space time cube.

Please note that I am not looking for a Python script based solution, as I know this can be easily done in R. I am looking for a tool or a model builder based solution` (if necessary).

Sample data:

1/27/2021 4:48:45 PM
12/30/2020 8:59:58 PM
12/24/2020 9:18:21 PM
1/22/2021 10:38:24 PM
12/18/2020 9:12:52 AM
1/28/2021 9:26:15 AM
4
  • 1
    You're not "looking" for a python script solution, but using a python interpreter in field calculator would probably be your best approach. Model Builder is a GUI for python, and there is no tool that just does this. Create three new fields, one for each date parameter. The field calculator can be used to get the date parameters, and if your input values are stored in a date type field, it's very easy. Year is !datefield!.year, Month is !datefield!.month and Day is !datefield!.day. Example: stackoverflow.com/questions/26105804/…
    – evv_gis
    Aug 31, 2022 at 15:21
  • 1
    @evv_gis, cheers, that works, if you want you can add this as an answer. Aug 31, 2022 at 15:29
  • @evv_gis, for some reason now the space time cube tool is not picking up these new columns under Time Field. Could there be a reason for this? Do I need to merge these new columns into a new Date column? Aug 31, 2022 at 15:31
  • 1
    First time looking at the Create Space Time Cube by Aggregating Points, and it looks like your input above would work as long as the data is stored in a date type field. There doesn't appear to be a need to split out the year, month, and day.
    – evv_gis
    Aug 31, 2022 at 15:39

1 Answer 1

2

Create new fields in your field designer for each field, year, month, and day. Then use the field calculator to calculate each value using the python interpreter, respectively. !datefield!.year, !datefield!.month, and !datefield!.day.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.