Date-related Cleaners

Normalize Dates to Short Format

Normalizes Dates to Short format (format is based on System Text Preferences).

Normalize Dates to Medium Format

Normalizes Dates to Medium format (format is based on System Text Preferences).

Normalize Dates to Long Format

Normalizes Dates to Long format (format is based on System Text Preferences).

Normalize Dates to Full Format

Normalizes Dates to Full format (format is based on System Text Preferences).

Normalize Dates to MM-DD-YYYY

Normalizes Dates to MM-DD-YYYY format.

Normalize Dates to DD-MM-YYYY

Normalizes Dates to DD-MM-YYYY format.

Normalize Dates to YYYY-MM-DD

Normalizes Dates to YYYY-MM-DD format.


DateNow Expansion

DateNow Expansion is a more advanced cleaner and requires a deeper dive into how it all works, particularly beyond the basic use case.

The basic use of the DateNow Expansion cleaner is to replace ${DATENOW} with today’s date (using the localized medium date format).

${DATENOW} = ‘Apr 21, 2017’.

Simple Formatting

DateNow expansion has some additional formatting available. You can specify one of the system formats (Short, Medium, Long, Full) by using the these forms of the DATENOW token:

${DATENOW-SHORT} = 04/21/2017

${DATENOW-MEDIUM} = Apr 21, 2017

${DATENOW-LONG} = April 21, 2017

${DATENOW-FULL} = Friday, April 21, 2017

This formatting will use the localized formatting, so it will reflect your current Preference settings and locale.

Basic Custom Formatting

TextSoap includes three additional built-in cleaners to normalize dates, and you can specify one of these formats as well:

${DATENOW-MM-DD-YYYY} = 04–21–2017

${DATENOW-DD-MM-YYYY} = 21–04–2017

${DATENOW-YYYY-MM-DD} = 2017–04–21

These are all the same formats used by the various Normalize Dates cleaners.

Using this cleaner

There are a couple ideas for using this cleaner.

Tip: If you are using a regular expression, remember to escape the $ char with a backslash (), since it has special meaning in both the Find AND Replace text.