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.
- If necessary, open your FOB Rookie project in ArcGIS Pro.
- Click the Analysis tab. In the Geoprocessing group, click Tools.
- In the Geoprocessing pane, search for Convert Time Field, and choose the Convert Time Field (Data Management Tools) tool.
- In the Convert Time Field parameters, for Input Table, choose RocketsLaunch.
- 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.
- 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).
- For Output Time Field, type Pacific_Standard_Time. (You must include the underscores.) This field will be created when you run the tool.
- If necessary, for Output Time Type, choose Date.
- Click Run.
- Open the RocketsLaunch table, scroll to the far right, and view the time format of the new Pacific_Standard_Time column.
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.
- In the Geoprocessing pane, click the Back button.
- If necessary, search for and open the Convert Time Zone tool. (It may still be the second tool listed on the pane.)
- In the Convert Time Zone parameters, for Input Table, choose RocketsLaunch.
- For Input Time Field, choose Pacific_Standard_Time.
- For Input Time Zone, choose Pacific_Standard_Time.
- For Output Time Field, type Coordinated_Universal_Time.
- If necessary, for Output Time Zone, choose UTC.
Next, you'll verify that the tool is set to reflect changes in daylight saving time.
- Click Daylight Saving Time to expand it.
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.
- Click Run.
- In the RocketsLaunch table, scroll to the right and view the Coordinated_Universal_Time column.
- In the Coordinated_Universal_Time column, scroll down to the rows for 3/7/2015 and 3/13/2015.
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.
- 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.
- Right-click the column heading for Pacific_Standard_Time and, in the menu, click 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.
- In the Alias column, double-click the field with Pacific_Standard_Time so it becomes editable.
- Remove the underscores between the words and replace them with spaces.
- In the same manner, for the Coordinated_Universal_Time alias, remove the underscores and replace them with blank spaces.
- In the Changes group, click Save.
- Close the Fields view.
Without underscores, your RocketsLaunch attribute table is easier to read.
- Close the table and save the project.
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.