Migrate Date Field To High Precision (Data Management)

Summary

Migrates date fields in a table to high precision.

Usage

    Caution:

    This tool modifies the input data. See Tools that modify or update the input data for more information and strategies to avoid undesired data changes.

  • High precision date fields support millisecond time.

  • Caution:

    Once a date field is migrated to high precision, it cannot be reverted to a standard precision date field.

  • The default format in which information is presented in high precision date fields is mm/dd/yyyy hh:mm:ss.fff with a specification of AM or PM.

Parameters

LabelExplanationData Type
Input Table

The geodatabase table or feature class containing the date fields that will be migrated to high precision.

Table View
Date Fields

The date fields that will be migrated to high precision.

Field

Derived Output

LabelExplanationData Type
Updated Table

The updated dataset with the specified date fields migrated to high precision.

Layer; Table View; Dataset

arcpy.management.MigrateDateFieldToHighPrecision(in_table, date_fields)
NameExplanationData Type
in_table

The geodatabase table or feature class containing the date fields that will be migrated to high precision.

Table View
date_fields
[date_fields,...]

The date fields that will be migrated to high precision.

Field

Derived Output

NameExplanationData Type
updated_table

The updated dataset with the specified date fields migrated to high precision.

Layer; Table View; Dataset

Code sample

MigrateDateFieldToHighPrecision example 1 (Python window)

The following Python script demonstrates how to use the MigrateDateFieldToHighPrecision function for a single table and date input.

import arcpy
arcpy.management.MigrateDateFieldToHighPrecision("C:/MyProject/MyGDB.gdb/Table1", "date_field1")
MigrateDateFieldToHighPrecision example 2 (Python window)

The following Python script demonstrates how to use the MigrateDateFieldToHighPrecision function using a list of date fields.

import arcpy
arcpy.management.MigrateDateFieldToHighPrecision("C:/MyProject/MyGDB.gdb/Table1", ["date_field1", "date_field2"])

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: No
  • Standard: Yes
  • Advanced: Yes

Related topics