ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • 帮助
  • Sign Out
ArcGIS Desktop

ArcGIS Online

专为贵组织打造的制图平台

ArcGIS Desktop

全面的专业性 GIS

ArcGIS Enterprise

面向企业的 GIS

ArcGIS Developers

用于构建位置感知应用程序的工具

ArcGIS Solutions

适用于行业的免费模板地图和应用程序

ArcGIS Marketplace

获取适用于组织的应用程序和数据

  • 文档
  • 支持
Esri
  • 登录
user
  • 我的个人资料
  • 登出

ArcMap

  • 主页
  • 入门
  • 地图
  • 分析
  • 管理数据
  • 工具
  • 扩展模块

Calculate End Date

  • 描述
  • 使用方法
  • 语法
  • 代码示例
  • 环境
  • 许可信息

描述

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.

旧版本:

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.

使用方法

  • The table is first sorted by entity (unique value field) if this is specified, and then by time stamp. With the start date field sorted in ascending order, the end date of any row is the same as the start date of the next row.

  • In order to use this tool the start date field must be able to be sorted in ascending order. To test this, open the attribute table for the feature class, right-click the field and click Sort Ascending. If the field cannot be sorted in ascending order, the field must be reformatted before using this tool.

  • The end date field value for the last row will be the same as the start date field value.

语法

arcpy.management.CalculateEndDate(Input_Table, {Unique_ID_Fields}, Start_Date_Field, End_Date_Field)
参数说明数据类型
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,...]
(可选)

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

派生输出

名称说明数据类型
Output_Table

Table View

代码示例

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)

环境

此工具不使用任何地理处理环境。

许可信息

  • Basic: 是
  • Standard: 是
  • Advanced: 是

ArcGIS Desktop

  • 主页
  • 文档
  • 支持

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

关于 Esri

  • 关于我们
  • 招贤纳士
  • Esri 博客
  • 用户大会
  • 开发者峰会
Esri
分享您的想法。
Copyright © 2021 Esri. | 隐私政策 | 法律声明