Home Data Prep for Data Science, AI and ML

Paxata Community Members: Something special in a community experience is coming your way. Stay tuned to this space.
In the meantime, check out the brand new Data Prep for Data Science topic here and the new DataRobot Community.

Visit the official Paxata Documentation portal for all of your doc needs.

How do I format dates so they can be recognized by my training model?

MelanieMelanie Posts: 70 admin
Date formatting issues are a common problem you'll find in the raw data that you need to prep for your training datasets. Often times the values are of type string or numeric, when what you need is for the variable to be cast as date type. Additionally, you may have formats like 20180101, when what you actually need is a format like 01/01/2018.

Paxata makes it easy to quickly convert your variables to date types and to also convert their formats to specific ISO formats. We'll give you a super short example here of how to quickly do this work, with links out to resources for deeper dives on all of the formats we support and the options you have when cleaning up your date values.

Example time
Here is a dataset with a variable for ship date. But notice the values for that variable exist as text strings in the data (note the A-Z icon that precedes the variable's name to indicate its type) when what you really need is date type. 

Converting this variable to a date type is as simple as:
  1. Click on the down arrow for the variable and select Change>into...>date:

  2. The Change menu opens. Select the format of your date data as it currently exists in the column—for example, yyyy-MM-dd:

    Note that you can also select "Custom" to provide a custom format.

  3. After you save the selection you made in step 2, notice the variable's type is converted to date type as indicated by the timer symbol:

If you need to also do transformations to convert the values to a specific ISO date type, that's easily done through a "Computed Column Expression". See Computed Columns Supported Functions for details.

Sign In or Register to comment.