Example of Extract from Date/Time Data to Text Data

A manager collects monthly 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 extracts the quarter and year components of a date/time column and puts them in a text column.

  1. In a column name cell, type Month Year.
  2. Copy and paste, or type the following data into the Month Year column:
  3. Choose Data > Date/Time > Extract to Text.
  4. In Extract from date/time column, enter Month Year.
  5. In Store text column in, type Quarter.
  6. Select Quarter and Year.
  7. Click OK.


The original month and year values are in C1. The quarter text values are in C2.

C1-D C2-T
Month Year Quarter
08/2014 Q32014
09/2014 Q32014
10/2014 Q42014
11/2014 Q42014
12/2014 Q42014
01/2015 Q12015
02/2015 Q12015
03/2015 Q12015

The manager can now create a bar chart with Quarter as the categorical variable.


When you use a text column to create a graph (or table), the text categories are in alphabetical order by default. To change the value order, right-click the column and choose Column Properties > Value Order.

By using this site you agree to the use of cookies for analytics and personalized content.  Read our policy