Date Format Normalizer avatar

Date Format Normalizer

Pricing

from $0.50 / 1,000 dates

Go to Apify Store
Date Format Normalizer

Date Format Normalizer

Normalize messy date strings into clean ISO 8601 or custom date formats. Handles common date formats, relative dates, multilingual inputs, timezone conversion, and returns clear error results for unparseable dates.

Pricing

from $0.50 / 1,000 dates

Rating

0.0

(0)

Developer

Avqelle Labs

Avqelle Labs

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

10 days ago

Last modified

Share

Normalize messy date strings into clean ISO 8601 or custom date formats.

Date Format Normalizer helps clean inconsistent date values from spreadsheets, CRMs, scraped data, API exports, forms, and automation workflows. It accepts common date formats, relative dates, multilingual date words, and timezone-aware timestamps, then returns consistent structured output.

What you get

For each input date, the Actor returns:

  • The original input value
  • A normalized date using your selected output format
  • A UTC ISO 8601 datetime with a Z suffix
  • A success or error status
  • A clear error code when parsing fails

Example result:

{
"input": "Jan 5th 2023",
"normalized": "2023-01-05",
"iso8601": "2023-01-05T00:00:00Z",
"status": "ok",
"error": null
}

Common use cases

  • Clean date columns before importing data into a CRM
  • Normalize scraped dates from websites
  • Standardize dates from CSV, Excel, Airtable, or Google Sheets exports
  • Convert mixed date formats before sending data to an API
  • Prepare date fields for databases, analytics, dashboards, or automation tools
  • Detect invalid or empty date values in messy datasets

Features

  • Converts common date formats into clean output
  • Supports custom output formats using Python strftime
  • Returns ISO 8601 datetime output in UTC with a Z suffix
  • Removes microseconds from ISO 8601 output for cleaner results
  • Handles relative dates such as 2 days ago
  • Supports multilingual date terms such as gestern
  • Supports timezone conversion
  • Supports ambiguous numeric date handling with date order options
  • Returns clear error results for invalid or empty inputs
  • Charges only successfully normalized dates

Input

dates

Array of date strings to normalize.

Example:

[
"Jan 5th 2023",
"05/01/2023",
"2 days ago",
"gestern",
"2023-12-25T10:30:00"
]

output_format

Python strftime format used for the normalized field.

Default:

%Y-%m-%d

Examples:

FormatExample output
%Y-%m-%d2023-01-05
%d/%m/%Y05/01/2023
%B %d %YJanuary 05 2023
%Y-%m-%dT%H:%M:%S2023-01-05T00:00:00

locale

Language code used for parsing locale-specific dates.

Examples:

en
de
fr
es
ar
zh

Use an empty value for auto-detection. This is useful when your input contains mixed-language dates.

Example:

"locale": ""

timezone

Timezone used to interpret dates without timezone information.

Default:

UTC

Examples:

UTC
US/Eastern
Europe/Berlin
Asia/Karachi

The iso8601 output is returned in UTC with a Z suffix.

date_order

Controls ambiguous numeric dates such as 05/01/2023.

ValueMeaning
emptyAuto, use locale-based date order
MDYMonth/day/year
DMYDay/month/year
YMDYear/month/day

Example:

"date_order": "DMY"

With DMY, 05/01/2023 is treated as 5 January 2023.

With MDY, 05/01/2023 is treated as May 1, 2023.

prefer_dates_from

Controls how ambiguous relative dates are interpreted.

ValueMeaning
pastPrefer past dates
futurePrefer future dates
current_periodPrefer the current period

prefer_day_of_month

Controls what day should be used when the input has a month and year but no day.

ValueMeaning
firstUse the first day of the month
lastUse the last day of the month
currentUse the current day number

Example input

{
"dates": [
"Jan 5th 2023",
"05/01/2023",
"2 days ago",
"gestern",
"2023-12-25T10:30:00",
"invalid date",
""
],
"output_format": "%Y-%m-%d",
"locale": "",
"timezone": "UTC",
"date_order": "",
"prefer_dates_from": "current_period",
"prefer_day_of_month": "current"
}

Example output

[
{
"input": "Jan 5th 2023",
"normalized": "2023-01-05",
"iso8601": "2023-01-05T00:00:00Z",
"status": "ok",
"error": null
},
{
"input": "05/01/2023",
"normalized": "2023-05-01",
"iso8601": "2023-05-01T00:00:00Z",
"status": "ok",
"error": null
},
{
"input": "2 days ago",
"normalized": "2026-05-15",
"iso8601": "2026-05-15T21:35:26Z",
"status": "ok",
"error": null
},
{
"input": "gestern",
"normalized": "2026-05-16",
"iso8601": "2026-05-16T21:35:26Z",
"status": "ok",
"error": null
},
{
"input": "2023-12-25T10:30:00",
"normalized": "2023-12-25",
"iso8601": "2023-12-25T10:30:00Z",
"status": "ok",
"error": null
},
{
"input": "invalid date",
"normalized": null,
"iso8601": null,
"status": "error",
"error": "COULD_NOT_PARSE_DATE"
},
{
"input": "",
"normalized": null,
"iso8601": null,
"status": "error",
"error": "EMPTY_INPUT"
}
]

Output fields

FieldDescription
inputOriginal input value
normalizedDate formatted using your selected output_format
iso8601UTC ISO 8601 datetime with Z suffix
statusok for successful parsing, error for failed parsing
errorError code when parsing fails, otherwise null

Error codes

ErrorMeaning
EMPTY_INPUTThe input value was empty
COULD_NOT_PARSE_DATEThe Actor could not understand the date
Other error textA parser or formatting error occurred

Pricing

This Actor is charged only for successfully normalized dates.

Invalid, empty, or unparseable dates are returned with error information and are not charged.

$0.50 per 1,000 successfully normalized dates

Equivalent per-result price:

$0.0005 per successfully normalized date

The small Actor start fee may also apply.

Important behavior

Relative dates depend on run time

Inputs such as 2 days ago are calculated based on the time when the Actor runs.

For example, if the Actor runs on May 17, then 2 days ago resolves to May 15.

Relative dates can include the run time

For relative inputs, the iso8601 value can include the hour, minute, and second from the Actor run time.

Example:

{
"input": "2 days ago",
"normalized": "2026-05-15",
"iso8601": "2026-05-15T21:35:26Z",
"status": "ok",
"error": null
}

Ambiguous dates need date order

The input 05/01/2023 can mean different things in different countries.

Use date_order to control this:

"date_order": "MDY"

means May 1, 2023.

"date_order": "DMY"

means January 5, 2023.

Natural language phrase support

This Actor is designed for common dates, relative dates, multilingual date words, and timezone-aware timestamps. Some natural language phrases, such as next friday, last monday, or next week, may not parse consistently. If a value cannot be parsed, the Actor returns an error result instead of failing the whole run.

For mixed-language input:

{
"locale": ""
}

For US-style numeric dates:

{
"date_order": "MDY"
}

For European-style numeric dates:

{
"date_order": "DMY"
}

For clean ISO date output:

{
"output_format": "%Y-%m-%d"
}

Full example

{
"dates": [
"Jan 5th 2023",
"05/01/2023",
"2 days ago",
"gestern",
"2023-12-25T10:30:00"
],
"output_format": "%Y-%m-%d",
"locale": "",
"timezone": "UTC",
"date_order": "",
"prefer_dates_from": "current_period",
"prefer_day_of_month": "current"
}

Notes for integrations

The Actor writes one result object per processed input date to the default dataset.

Use the dataset output when connecting this Actor to:

  • Apify API
  • Zapier
  • Make
  • Webhooks
  • Google Sheets
  • Airtable
  • CRM imports
  • Custom data pipelines

Support

If a date does not parse as expected, check:

  1. Whether the date is ambiguous, such as 05/01/2023
  2. Whether date_order is set correctly
  3. Whether locale should be empty for auto-detection
  4. Whether the input contains unsupported natural language phrases
  5. Whether the selected output_format is a valid Python strftime format