Calculate End Date (Data Management)

Summary

Populates the values for a specified end date field with values calculated using the start date field specified. This tool is useful when the intervals between start date field values are not regular and you want to animate the feature class or table through time or some other value using the Animation toolbar.

LegacyLegacy:

This is a deprecated tool. This functionality has been replaced by the Calculate End Time tool that calculates end time for a given start time field.

Usage

Syntax

CalculateEndDate_management (Input_Table, {Unique_ID_Fields}, Start_date_field, End_date_field)
ParameterExplanationData Type
Input_Table

The feature class or table for which an end date field is calculated based on the start date field specified.

Table View
Unique_ID_Fields
[Unique_ID_Field,...]
(Optional)

The name of the field or fields that can be used to uniquely identify spatial entities. This field or these fields are used to first sort based on entity type if there is more than one entity. For instance, for a feature class representing population values per state over time, state name could be the unique value field (the entity). If population figures are per county, you would need to set county name and state name as the unique value fields, since some county names are the same for different states. If there is only one entity, this parameter can be ignored.

Field
Start_date_field

The field containing values that will be used to calculate values for the end date field. The start date field and the end date field must be of the same format.

Field
End_date_field

The field that will be populated with values based on the start date field specified. The start date field and the end date field must be of the same format.

Field

Code Sample

CalculateEndDate (Python window)
import arcpy
arcpy.CalculateEndDate_management("C:/data/HistPop.shp", "State_FIP;County_FIP", "Start_Date", "End_Date")
CalculateEndDate (stand-alone script)
# Name: CalculateEndDate_Ex02.py
# Description: Calculate end date based on a start date field
# Requirements: None

# Import system modules
import arcpy

# Set local variables
inTable = "C:/Data/HistPop.shp"
uniqueIdFields = "State_FIP;County_FIP"
startDateField = "Start_Date"
endDateField = "End_Date"
 
# Execute CalculateEndDate
arcpy.CalculateEndDate_management(inTable, uniqueIdFields, startDateField, endDateField)

Environments

This tool does not use any geoprocessing environments

Licensing Information

ArcView: Yes
ArcEditor: Yes
ArcInfo: Yes

10/27/2014