Defining custom date/time display formats

You can combine date/time components to build custom display formats. A display format can include a date, a time, both a date and a time, or an elapsed time. Custom formats that you create are saved so that you can assign them to other columns.

Define a custom date/time display format

  1. Select one or more columns.
  2. Choose Editor > Format Column.
  3. From Choose type, select Date, Time, or Elapsed time.
  4. In Custom format, type a new format. Refer to the following sections for a list of components and guidelines.
  5. Click OK.
Note

Some date/time components in the following tables are not available in previous versions of Minitab. If you use these components in a custom date/time format and save the worksheet in an older version of Minitab, these components are converted to a different component, set to a default format, or ignored.

Date formats

Follow these guidelines when you specify date formats:
  • Specify one or more of the following, in any order: day, month, year.
  • Use one of the following to separate the components: a space, a slash (/), a hyphen (-), or a period (.). Components must be separated by the same symbol. For example, both 1/1/14 and 1-1-14 are valid, but 1/1-14 is not valid. One exception is the format mmmm d, yy.
  • Quarter (Qq) and week (Wkw) components cannot be used with day, month, or time components, but only with the year. Quarters and weeks cannot be used together.
Use the following components to build custom date formats.
Component How the date is displayed Example
m Month as a number (1–12) 1, 2, and so on
mm Month as a two-digit number (01–12) 01, 02, and so on
mmm Month as a three-letter abbreviation Jan, Feb, and so on
mmmm Month January, February, and so on
d Day of the month (1–31) 1, 2, and so on
dd Day of the month as a two-digit number (01–31) 01, 02, and so on
ddd Day of the week as a three-letter abbreviation Mon, Tue, and so on
dddd Day of the week Monday, Tuesday, and so on
yy Year as a two-digit number 15, 16, and so on
yyyy Year as a four-digit number 2015, 2016, and so on
Qq

"Q" and the number of the quarter

  • Q1 = January 1–March 31
  • Q2 = April 1–June 30
  • Q3 = July 1–September 30
  • Q4 = October 1–December 31

To display the year followed by the quarter, you must use one of the following formats: yyyyQq or yyQq.

Q1, Q2, Q3, Q4
qQ The number of the quarter and "Q" 1Q, 2Q, 3Q, 4Q
Wkw

"Wk" and the week number

By default, Week 2 of each year begins the Sunday after January 1. The last week of the year ends on December 31. For most years, week 1 and week 53 have fewer than seven days.

You can change the day that begins each week in the Windows Control Panel.

To display the year followed by the week, you must use one of the following formats: yyyyWkw, yyWkw, yyyyWkww, or yyWkww.

Wk1, Wk2, and so on
Wkww "Wk" and a week as a two-digit number Wk01, Wk02, and so on
wWk Week number and "Wk" 1Wk, 2Wk, and so on
wwWk Week as a two-digit number and "Wk" 01Wk, 02Wk, and so on

Time formats

Follow these guidelines when you specify time formats:
  • Components must be contiguous. For example, hh:mm and mm:ss are valid, but hh:ss is not valid.
  • Components are separated as follows: hh:mm:ss.ss AM/PM. The space before AM/PM is optional.
Use the following components to build custom time formats.
Component How the time is displayed Example
h Hour (0–23) 7, 8, and so on
hh Hour as a two-digit number (00–23) 07, 08, and so on
mm

Minute as a two-digit number (00–59)

Minutes must be preceded by hour (for example, hh:mm) or followed by second (for example, mm:ss).

08:01, 08:02 and so on
ss

Seconds as a two-digit number (00–59)

Seconds must be preceded by the minute (for example, mm:ss).

08:01:01, 08:01:02, and so on
.s

Tenths of a second (0–9)

Tenths of a second must be preceded by the minute and second (for example, mm:ss.s).

08:01:01.1, 08:01:01.2, and so on
.ss

Hundredths of a second (00–99)

Hundredths of a second must be preceded by the minute and second (for example, mm:ss.ss).

08:01:01.01, 08:01:01.02, and so on
.sss

Thousandths of a second (000–999)

Thousandths of a second must be preceded by the minute and second (for example, mm:ss.sss).

08:01:01.001, 08:01:01.002, and so on
AM/PM

The period of the day using 12-hour time

You can use this component only if hours are specified (for example, hh AM/PM).

08:01 AM

08:01:01.02 PM

A/P

am/pm

a/p

Additional indicators for AM/PM

08:01 A

08:01:01.02 pm

08:01:01.02 p

Combining dates and times into one format

Follow these guidelines when you create a format that has both date and time components:
  • The date components must always be first.
  • A space must separate the date components from the time components.
  • Elapsed time formats cannot be combined with date formats.

Elapsed time formats

Elapsed time measures the duration of an event. To denote elapsed time, enclose the largest time unit in square brackets. For example, the format [d].hh:mm:ss indicates elapsed time in days, hours, minutes, and seconds. If you assign that format to a column and enter 1.10:23, Minitab interprets the value as 1 day, 10 hours, and 23 minutes. If you assign that format to a column and enter 10:23, Minitab interprets the value as 0 days, 10 hours and 23 minutes.

Use the following components to build custom elapsed time formats.
Component How the elapsed time is displayed Example
[d] Days. When used with smaller components, elapsed days must be followed by a period (.).
Note

This component is not supported in Excel. If you copy elapsed time data with the day component into Excel, the days are converted into hours.

1 (1 day); 14.12 (14 days, 12 hours)
[dd] Days with a leading zero. When used with smaller components, elapsed days must be followed by a period (.). 01 (1 day); 14.12 (14 days, 12 hours)
[h] Hours as the largest unit of elapsed time. When used with smaller components, elapsed hours must be followed by a colon (:). 1 (1 hour); 1:20 (1 hour, 20 minutes)
[hh] Hours as the largest unit of elapsed time, with a leading zero. When used with smaller components, elapsed hours must be followed by a colon (:). 01 (1 hour); 01:20 (1 hour, 20 minutes)
h Hours (0-23). When used with smaller components, elapsed hours must be followed by a colon (:). 14.2:20 (14 days, 2 hours, 20 minutes)
hh Hours with a leading zero (00-23). When used with smaller components, elapsed hours must be followed by a colon (:). 14.02:20 (14 days, 2 hours, 20 minutes)
[m] Minutes as the largest unit of elapsed time. When used with smaller components, elapsed minutes must be followed by a colon (:). 20:35 (20 minutes, 35 seconds)
mm

Minutes (00–59). When used with smaller components, elapsed minutes must be followed by a colon (:).

You can use this component only if the hours (hh or h) are specified.

14.12:20:35 (14 days, 12 hours, 20 minutes, 35 seconds)
[s] Seconds as the largest unit of elapsed time. When used with smaller components, elapsed seconds must be followed by a decimal symbol(.). 35.4 (35 seconds, 4 tenths of a second)
ss

Seconds (00–59). When used with smaller components, elapsed seconds must be followed by a decimal symbol(.).

You can use this component only if the minute (mm or [m]) is specified.

14.12:20:35.4 (14 days, 12 hours, 20 minutes, 35 seconds, 4 tenths of a second)
.s

Tenths of a second (0–9)

You can use this component only if the seconds (ss) are specified.

14.12:20:35.4 (14 days, 12 hours, 20 minutes, 35 seconds, 4 tenths of a second)
.ss

Hundredths of a second (00–99)

You can use this component only if the seconds (ss) are specified.

14.12:20:35.44 (14 days, 12 hours, 20 minutes, 35 seconds, 44 hundredths of a second)
.sss

Thousandths of a second (000–999)

You can use this component only if the seconds (ss) are specified.

14.12:20:35.444 (14 days, 12 hours, 20 minutes, 35 seconds, 444 thousandths of a second)