Skip To Content

Convert time format and time zone

In the previous lesson, you added and symbolized data on attacks and rocket strikes. In this lesson, you'll correctly format the local attack time in the attribute table so you can save it as Pacific standard time and then convert it to UTC.

Convert time format

In the spreadsheet you downloaded earlier, the attack date and time values reference local time. When you used the Excel To Table tool, the temporal data was stored in the attribute table as a text string instead of as a date, a database format that optimizes the storing and processing of temporal data. You'll reformat the temporal data in order to create time stamps, a requirement for converting local time into UTC.

  1. If necessary, open your FOB Rookie project in ArcGIS Pro.
  2. Click the Analysis tab. In the Geoprocessing group, click Tools.
  3. In the Geoprocessing pane, search for Convert Time Field, and choose the Convert Time Field (Data Management Tools) tool.

    Convert Time Field tool

  4. In the Convert Time Field parameters, for Input Table, choose RocketsLaunch.
  5. For Input Time Field, choose Attack time (local).

    For the next parameter, Input Time Format, you need to specify the format in which the time values were stored in the input time field.

  6. For Input Time Format, type yyyy/mm/dd HH:mm:ss (note that the format is case sensitive and there is a blank space between dd and HH).
  7. For Output Time Field, type Pacific_Standard_Time. (You must include the underscores.) This field will be created when you run the tool.
  8. If necessary, for Output Time Type, choose Date.

    Output Time Type

  9. Click Run.
  10. Open the RocketsLaunch table, scroll to the far right, and view the time format of the new Pacific_Standard_Time column.
    Pacific Standard Time column

    The time and date from the first column are displayed in the reformatted date type.

    For more information about time stamps, see Supported field formats in the ArcGIS Pro help as well as the Convert Time Field and Convert Time Zone geoprocessing tools.

Convert time zone

Your field exercise is in the Pacific time zone, which is seven or eight hours behind UTC depending on Pacific standard time (PST) or Pacific daylight saving time (PDST). The Convert Time Zone geoprocessing tool converts properly formatted time stamps into any time zone regardless of whether a time zone is observing daylight saving time.

  1. In the Geoprocessing pane, click the Back button.
  2. If necessary, search for and open the Convert Time Zone tool. (It may still be the second tool listed on the pane.)
  3. In the Convert Time Zone parameters, for Input Table, choose RocketsLaunch.
  4. For Input Time Field, choose Pacific_Standard_Time.
  5. For Input Time Zone, choose Pacific_Standard_Time.
  6. For Output Time Field, type Coordinated_Universal_Time.
  7. If necessary, for Output Time Zone, choose UTC.

    Next, you'll verify that the tool is set to reflect changes in daylight saving time.

  8. Click Daylight Saving Time to expand it.

    Daylight Saving Time

    Both boxes are checked, so the tool will reflect time zone changes. In the spring, the Pacific time zone adopts Pacific daylight saving time and moves forward one hour, which puts it seven hours behind UTC. In the fall, the Pacific time zone reverts to Pacific standard time, which puts it eight hours behind UTC.

  9. Click Run.
  10. In the RocketsLaunch table, scroll to the right and view the Coordinated_Universal_Time column.

    Coordinated Universal Time column

  11. In the Coordinated_Universal_Time column, scroll down to the rows for 3/7/2015 and 3/13/2015.

    Adjusted time

    The table now reflects that, between 3/7/2015 and 3/13/2015, Pacific daylight saving time was adopted. The time differences between the Pacific standard time and coordinated universal time on these dates is automatically adjusted from eight to seven hours.

  12. Save the project.

Edit the table

The geoprocessing tools you just used created and populated the last two columns in the RocketsLaunch table. Now, you'll edit the column headings to make them more readable.

  1. Right-click the column heading for Pacific_Standard_Time and, in the menu, click Fields.

    Fields

    The Fields view opens for the RocketsLaunch table. It lists all the fields in the table and their properties. Within the Fields view, you can create new fields, delete fields, and modify existing fields and properties.

    Fields view

  2. In the Alias column, double-click the field with Pacific_Standard_Time so it becomes editable.
  3. Remove the underscores between the words and replace them with spaces.
  4. In the same manner, for the Coordinated_Universal_Time alias, remove the underscores and replace them with blank spaces.
  5. In the Changes group, click Save.

    Save

  6. Close the Fields view.

    Without underscores, your RocketsLaunch attribute table is easier to read.

  7. Close the table and save the project.

    No underscores

In this lesson, you converted local time from a text format into a date format in order to create time stamps and synchronize your data with UTC. In the next lesson, you'll visualize data to identify insurgent behavioral patterns—a necessary step in preventing future attacks on FOB Rookie.