Date format conversion

The Change Date operation converts the format of dates.

Tomas Larsson avatar
Written by Tomas Larsson
Updated over a week ago

Keywords: change date format, date, time, year, month, day, hour, minute, second

The Change Date operation changes the format of dates and times in a date field.

Step-by-step guide

1. Set field type to date

Make sure your field containing dates is of type "date". If not, use the Change Field Type operation to change the type to "date". The dates/times should now be in the ISO 8601 format, such as 2020-06-06T23:59:59 (which we will use as an example below).

2. Open the operation configuration window

Select the date field you want to reformat in the Schema workbench and click the "Add operation" button at the top of the workspace.

Search for "Change date format" or find the operation under "Preprocessing & cleaning" and click it.

3. Select time format

The time format options available are:

  • Remove time

  • HH:MM:SS (e.g 23:59:59)

  • HH:MM (e.g. 23:59)

  • HH:MM:SS AM/PM (e.g. 11:59:59 PM)

  • HH:MM AM/PM (e.g. 11:59 PM)

4. Select date format

The date format options available are:

  • Remove date

  • YY-MM-DD (e.g. 20-06-07)

  • YYYY-MM-DD (e.g. 2020-06-07)

  • MM/DD/YY (e.g. 06/07/20)

  • M/D/YY (e.g. 6/7/20)

  • NN DD/MMM YY (e.g. Sun 07/Jun 20)

  • MMMM D, YYYY (e.g. June 7, 2020)

  • NNNN, MMMM D, YYYY (e.g. Sunday, June 7, 2020)

  • NN, MMM D, YY (e.g. Sun, Jun 7, 20)

  • MMM D, YY (e.g. Jun 7, 20)

  • MM/DD/YYYY (e.g. 06/07/2020)

  • D. MMM. YYYYY (e.g. 7. Jun. 2020)

  • D. MMMM YYYY (e.g. 7. June 2020)

  • MMM D, YYYY (e.g. Jun 7, 2020)

  • NN, MMMM D, YYYY (e.g. Sun, June 7, 2020)

  • NNNN, MMMM DD, YYYY (e.g. Sunday, June 07, 2020)

  • YYYY-MM (e.g. 2020-06)

  • YYYY-MMM (e.g. 2020-Jun)

  • YYYY-MMMM (e.g. 2020-June)

  • MMM, 'YY (e.g. Jun, '20)

  • MMMM, 'YY (e.g. June, '20)

  • MM-YYYY (e.g. 06-2020)

  • MMM, YYYY (e.g. Jun, 2020)

  • MMMM, YYYY (e.g. June, 2020)

  • YYYY (e.g. 2020)

5. Apply the operation

Click "Apply" to apply the operation. Your dates are now converted to the specified format.

Did this answer your question?