ArcGIS Pro 3.1 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / TimeUnit Enumeration
Example Example

In This Topic
    TimeUnit Enumeration
    In This Topic
    Specifies the unit of time.
    Syntax
    Members
    MemberDescription
    Centuries Represents a unit of time equal to 100 years.
    Days Represents a unit of time equal to 24 hours.
    Decades Represents a unit of time equal to 10 years.
    Hours Represents a unit of time equal to 60 minutes or 3600 seconds.
    Milliseconds Represents a unit of time equal to one thousandth of a second.
    Minutes Represents a unit of time equal to 60 seconds.
    Months Represents a unit of time that varies between 28 and 31 days. A year is divided into 12 months.
    Seconds Represents the base unit of time in the International System of Units.
    Weeks Represents a unit of time equal to 7 days.
    Years Represents a unit of time equal to 365 days in a regular year and 366 days in a leap year.
    Example
    Step forward in time by 1 month
    public void StepMapTime()
    {
      //Get the active view
      MapView mapView = MapView.Active;
      if (mapView == null)
        return;
    
      //Step current map time forward by 1 month
      TimeDelta timeDelta = new TimeDelta(1, TimeUnit.Months);
      mapView.Time = mapView.Time.Offset(timeDelta);
    }
    
    Inheritance Hierarchy

    System.Object
       System.ValueType
          System.Enum
             ArcGIS.Desktop.Mapping.TimeUnit

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.0 or higher.
    See Also