Summary
Creates new fields containing date parts (hour, month, year, and so on) from user-defined date field.
Usage
- Existing date part values will be overwritten on the Target Features if the fields already exist.
- Date part values do not update automatically when the values in the Date Field is updated. This tool should be run as often as the source Date Field is updated.
- Date part field names are generated automatically based on the input Date Field name.
Syntax
ExtractDateParts_crime (Target_Features, Date_Field, {Weekday}, {Hour}, {Month}, {Day_of_Month}, {Year})
Parameter | Explanation | Data Type |
Target Features | Input features to add date part fields to. | Feature Layer |
Date Field | Date field to extract date parts from. | Field |
Weekday (Optional) | If checked, the tool creates a field with extracted weekday from date field formatted as text. For example, Wednesday. | Boolean |
Hour (Optional) | If checked, the tool creates a field with extracted hour from date field formatted as text in range 0 - 23. | Boolean |
Month (Optional) | If checked, the tool creates a field with extracted month from date field formatted as text in range 1 - 12. | Boolean |
Day of Month (Optional) | If checked, the tool creates a field with extracted day of month from date field formatted as text in range 1 - 31. | Boolean |
Year (Optional) | If checked, the tool creates a field with extracted year from date field formatted as text in yyyy format. | Boolean |
Licensing information
- ArcGIS Desktop Basic: Yes
- ArcGIS Desktop Standard: Yes
- ArcGIS Desktop Advanced: Yes