官术网_书友最值得收藏!

  • Minitab Cookbook
  • Isaac Newton
  • 231字
  • 2021-07-16 12:29:19

Extracting values from a date/time column

Often, it can be useful to find values such as day, month, or hour of the day from a date column. This can help later on while trying to find out about the variation in our results, finding effects based on day of the week or month of the year.

Getting ready

The data column displayed in the following screenshot shows dates in the mm/dd/yyyy format. To run this recipe, type the following data into a new column and label the column as Date. We will then create a new column displaying the months from the dates.

Getting ready

How to do it…

The following steps will create a column for the month from the dates in the worksheet:

  1. Navigate to Data | Extract from Date/Time | Extract to Text.
  2. In the dialog box, enter the date column in the Extract from date/time column section. Enter Month into the Store text column in section.
  3. Tick the Month selection and click on OK.
    How to do it…

How it works…

If the worksheet does not contain a column called Month already, it will create a new column for us. The selected fields will then populate this column in the worksheet. The Extract to Text option will create months and days of the week by their names, where the Extract from date/time to Numeric option will create a column of numbers.

主站蜘蛛池模板: 蕉岭县| 虹口区| 神池县| 邹平县| 长葛市| 舞阳县| 云南省| 永济市| 侯马市| 广宗县| 巫山县| 东阳市| 新乐市| 松潘县| 广德县| 白水县| 航空| 会宁县| 咸丰县| 荣成市| 伽师县| 海林市| 陆河县| 柳州市| 库车县| 巩义市| 海阳市| 汨罗市| 昭平县| 观塘区| 乐平市| 敦化市| 宜昌市| 武鸣县| 甘泉县| 新郑市| 芷江| 唐海县| 哈巴河县| 民乐县| 韶关市|