Splitting Columns and Reordering

Use this function to split a column and reorder the split columns.

Take project 1 in Sample-patients dataset for example.

The VISIT column provides the visit date information mostly in the mm/dd/yyyy format. There is one exception, 15/12/1999 ( patient number is 123 in the PATNO column), which is in the dd/mm/yyyy format. When splitting this cell, you need to reorder the split columns. To split the VISIT column into Month, Day, and Year columns, and reorder the split columns:

Procedure

  1. From the VISIT column, click Edit columns > Split columns and reorder.
    The Split column by condition with reorder on column VISIT dialog opens.
  2. In the Target column name, specify the names for the spilt columns one by one. Here, enterMonth for the Month column, and then click Add. Add the names for the Day and Year columns one by one.
  3. Click Create next to Condition expression to create a condition.
    The Preview condition expression dialog opens.
  4. In the Expression field, enter cells['PATNO'].value=="123". Click OK.
  5. Click Separator and enter the forward slash (/) in the field next to the radio button.
  6. Click Add next to Condition layout list to add the condition.
  7. Click Reorder.
  8. In the Reorder Columns dialog, drag the split columns to map the date format. Click OK.