Using ArcGIS Desktop 10.6.1. I have a large dataset that I need to view sequentially by month AND year. Instead of using Select by Attribute for each month/year combo (i.e. February 2017-May 2019 for 28 total feature classes).
Can this be done in ModelBuilder?
Data is currently in a file geodatabase and I'm looking to export each date/month as a feature class.
1 Answer 1
If the field holding your dates are of date data type, then:
- Add a text field
- Use Field Calculator to write year and month to the field, see for example: How To: Extract a portion of the Date field
- Split By Attributes using the field as
Split_Fields
(If the field is already text and year-month then all you need is Split By Attributes)
With Split By Attributes you probably dont need to use ModelBuilder and Iterators.
-
Excellent! I actually don't need to extract a date. They are two standalone columns - one as Month and one as Year. Would you suggest I concatenate the two into one new column and then use Split by Attributes?Susan– Susan2019年06月12日 18:04:27 +00:00Commented Jun 12, 2019 at 18:04
-
Nice! No you can pass both fields to Split By AttributesBera– Bera2019年06月12日 18:05:29 +00:00Commented Jun 12, 2019 at 18:05
-
1Yeah, I tried selecting both fields in Split By Attributes and nothing happened. I just concatenated both fields into one new column and ran it again. It worked! Thanks so much for the help!Susan– Susan2019年06月12日 18:18:52 +00:00Commented Jun 12, 2019 at 18:18
Explore related questions
See similar questions with these tags.