Skip to main content
Workday User Guide
Last Updated: 2023-06-23
Convert Dataset Text Fields to Date Fields

Convert Dataset Text Fields to Date Fields

  • Dataset with a Text field containing date data.
  • Any of these security requirements:
    • Prism Datasets: Manage
      domain in the Prism Analytics functional area.
    • Dataset Editor
      permission on the dataset.
    • Dataset Owner
      permission on the dataset.
You can create a Prism calculated field to convert a Text field containing date values to a Date field.
  1. Access the
    Edit Dataset Transformations
    task for a dataset.
  2. Select a dataset pipeline and stage into which to add the Prism calculated field.
  3. Add a new field.
  4. In the expression editor for this new field, enter an expression that uses the TO_DATE function.
    When you enter the expression using the TO_DATE function, make sure that you use the Text field you want to convert and the date format that best matches the values in that Text field. To quickly enter a field name, type a left square bracket ( [ ).
    Suppose that you have a field called
    start_date
    that contains data that looks like
    25-May-2017
    . Use this expression:
    TO_DATE([start_date], "dd-MMM-yyyy")
  5. In the inspector panel, enter a name. Field names must follow name validation rules.
  6. Save the Prism calculated field by clicking
    Enter
    on your keyboard.
    Clicking another field on the page also saves the changes to the Prism calculated field.
Prism creates a new field and populates it by converting the data to the Date field type.