ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / TimeDelta Class
Members Example

In This Topic
    TimeDelta Class
    In This Topic
    Represents a time interval defined by a positive or negative value and a unit of time.
    public class TimeDelta 
    Public Class TimeDelta 
    Similar to System.TimeSpan this class offers advantages in that it can represent time intervals that are not uniform in time, for example months or years. TimeRange.Offset and other members accepting TimeDelta as an input are able to account and handle these irregular time periods like months or years when calculating new dates and times.
    Step forward in time by 1 month
    public void StepMapTime()
      //Get the active view
      MapView mapView = MapView.Active;
      if (mapView == null)
      //Step current map time forward by 1 month
      TimeDelta timeDelta = new TimeDelta(1, TimeUnit.Months);
      mapView.Time = mapView.Time.Offset(timeDelta);
    Inheritance Hierarchy



    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also