A hospital administrator collect dates and times of needlestick injuries. The administrator wants to round the date/time column to the day, so that the time components are set to 0.
The original date/time values are in C1. The rounded values are in C2.
C1-D | C2-D |
---|---|
Date and time of needlestick | Date |
1/2 12:00 | 1/2 0:00 |
1/10 3:10 | 1/10 0:00 |
1/17 11:33 | 1/17 0:00 |
... | ... |
To hide the time components, select and right-click the Date column and choose Format Column. Then, select a date display format without a time.
To round a date/time column to the nearest minute, complete the following steps.
12:52:34 |
04:32:10 |
06:52:03 |
11:22:33 |
The original time values are in C1. The rounded time values are in C2.
C1-D | C2-D |
---|---|
Hrs Mins Secs | Hrs Mins |
12:52:34 | 12:53:00 |
04:32:10 | 04:32:00 |
06:52:03 | 06:52:00 |
11:22:33 | 11:23:00 |
A manager collects date and time data and wants to create a bar chart where each bar shows the data for a quarter. To create the categorical variable Quarter, the manager rounds the date and time data to include only quarter and year. The manager then changes the column format to display only quarter and year.
04/29/2014 12:52:34 |
08/09/2015 04:32:10 |
12/04/2014 06:52:03 |
10/04/2013 11:22:33 |
The original time values are in C1. The rounded date values are in C2.
C1-D | C2-D |
---|---|
Date and Time | Quarter |
04/29/2014 12:52:34 | 2Q2014 |
08/09/2015 04:32:10 | 3Q2015 |
12/04/2014 06:52:03 | 4Q2014 |
10/04/2013 11:22:33 | 4Q2013 |