Overview for date/time commands

Use the date/time commands to round values in a date/time column, to extract components from a date/time column to a text column, or to extract components from a date/time column to a numeric column.

Round Date/Time Data

Round date/time values and save the rounded values in a date/time column. For example, a manager records the date and time for each sale but wants to summarize sales by day. The manager uses Round Date/Time Data to round the times to zero. In the following worksheet, the Date Time column contains the original data. The Date column contains the rounded date/time.

C1-D C2-D
Date Time Date
1/30/2015 12:52:19 1/30/2015 00:00:00
1/31/2015 10:29:26 1/31/2015 00:00:00
4/4/2015 02:34:01 4/4/2015 00:00:00
6/30/2015 08:04:10 6/30/2015 00:00:00

Round Date/Time Data changes the underlying date/time values. For more information about date/time data in Minitab, go to Date/time data.

If you only want to change the display of the data, without changing the underlying values, use Format Column. For example, you can choose to display only the year, only the date, only the date and time, and so on.

Extract from Date/Time Data to Numeric Data

Copy the specified date or time components from a date/time column to a numeric column. For example, a manager records daily sales data but wants to examine sales by week number. The manager uses Extract from Date/Time Data to Numeric Data to extract the week number. In the following worksheet, the Date column contains the original data. The Week column contains the week number (numeric data).

C1-D C2
Date Week
1/30/2015 5
1/31/2015 5
4/4/2015 14
6/30/2015 27

Extract from Date/Time Data to Text Data

Copy the specified date or time components to a text column. For example, a manager records monthly sales data but wants to use the fiscal quarter as a categorical variable for a bar chart. The manager uses Extract from Date/Time Data to Text Data to extract the quarter and year components. In the following worksheet, the Date column contains the original data. The Quarter column contains the quarter and year (text data).

C1-D C2-T
Date Quarter
1/30/2015 Q12015
1/31/2015 Q12015
4/4/2015 Q22015
6/30/2015 Q22015

Where to find these commands

To round or extract components of a date/time column, choose one of the following:
  • Data > Date/Time > Round Date/Time
  • Data > Date/Time > Extract to Numeric
  • Data > Date/Time > Extract to Text

When to use an alternate command

If you want to change the display of date/time data in the worksheet, without changing the underlying values, use Format Column.