ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Concatenate Date And Time Fields

  • Summary
  • Usage
  • Syntax
  • Code Sample
  • Environments
  • Licensing Information

Summary

Concatenates two separate date and time fields in a feature class or layer into a single field containing both the date and time.

Tracking Analyst is designed to work with temporal data containing date and time information in a single field. If your data contains the date and time in two separate fields, this tool can be used to combine the information together into a new field that Tracking Analyst will understand.

Usage

  • The input date and time fields must have a field data type of text.

  • The new field added to the feature layer by this tool will also have a field data type of text.

  • If you are working with a shapefile that contains a date field with only date information (i.e., 03/09/2006), you must transfer the date values into a text field before using this tool to concatenate it with a time field.

Syntax

ConcatenateDateAndTimeFields_TA (Feature_Class, DateField, TimeField, OutputField)
ParameterExplanationData Type
Feature_Class

The input feature class or layer.

Feature Layer
DateField

The text field in the input feature layer that contains date values.

Field
TimeField

The text field in the input feature layer that contains time values.

Field
OutputField

The name of the new concatenated date/time field to be created and added to the input feature layer.

String

Code Sample

ConcatenateDateAndTimeFields example (Python window)

This sample shows how to run the tool to concatenate the "MY_DATE" and "MY_TIME" fields, creating a new field named "NEW_DATE_TIME".

import arcpy
arcpy.CheckOutExtension("tracking")
inputGDB = "C:/arcgis/ArcTutor/Tracking Analyst/My_Geodatabase.gdb/my_feature_class"
arcpy.ConcatenateDateAndTimeFields_ta(inputGDB, "MY_DATE", "MY_TIME", "NEW_DATE_TIME")

Environments

  • Current Workspace

Licensing Information

  • ArcGIS for Desktop Basic: Requires Tracking Analyst
  • ArcGIS for Desktop Standard: Requires Tracking Analyst
  • ArcGIS for Desktop Advanced: Requires Tracking Analyst

Related Topics

  • An overview of the Tracking Analyst toolbox
Feedback on this topic?

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal