C3 AI Documentation Home

Time Extract

Extract timestamp functions in Visual Notebooks.

Configuration

FieldDescription
NameAn optional user-specified node name displayed in the workspace, both on the node and in the dataframe as a tab.
Time ColumnColumn(s) with timestamps Select the column with the desired timestamp from the auto-populated dropdown menu. If all columns in the menu appear dimmed, use a Columns - Type Converter node to convert the desired column to the timestamp data type.
Select FunctionsFunction options Function choices include: Select all, Year, Month, Day, Day of Week, Weekday, Hour, Minute, Second.

Node Inputs/Outputs

InputA Visual Notebooks dataframe
OutputDataframe with additional time extract column(s)

Example dataframe output

Figure 1: Example dataframe output

Examples

The dataset includes information about the price of apples over time. The following image shows an example input node:

Example input data

Figure 2: Example input data

First, extract one time function.

  1. Connect the data or an existing node to the Time Extract node.
  2. Double click on the Time Extract node.
  3. (optional) If you would like to differentiate this node, enter a name in the Name field. In this case, "Test1" has been entered. This name also appears in the node and as a tab in the dataset. The option to name is also available in the dataset.
  4. Select "timestamp (Timestamp)" in the Time column.
  5. Select the individual functions to see in the dataset, or select all. In this case, Day of Week has been selected. Note: The Day of Week column in the dataset assigns a numeric value for each day. In this case, 7 = Saturday.
  6. Select Run.

The Timestamp information is added to the dataset.

Example dataframe with Day of Week selected

Figure 3: Example dataframe with Day of Week selected

Next, add another function.

  1. Select a second Functions to see in the dataset. In this case, Hour has been selected.
  2. Select Run.

The Timestamp information is added to the dataset.

Example dataframe with additional Hour column

Figure 4: Example dataframe with additional hour column

Was this page helpful?