Convert Dataset Text Fields to Date Fields
- Dataset with a Text field containing date data.
- Any of these security requirements:
- Prism Datasets: Managedomain in the Prism Analytics functional area.
- Dataset Editorpermission on the dataset.
- Dataset Ownerpermission on the dataset.
You can create a Prism calculated field to convert a Text field containing date values to a Date field.
- Access theEdit Dataset Transformationstask for a dataset.
- Select a dataset pipeline and stage into which to add the Prism calculated field.
- Add a new field.
- 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 calledstart_datethat contains data that looks like25-May-2017. Use this expression:TO_DATE([start_date], "dd-MMM-yyyy")
- In the inspector panel, enter a name. Field names must follow name validation rules.
- Save the Prism calculated field by clickingEnteron 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.