Text: Find dates and date-times
Use this action to find date and time references in text and save the results to a data table.
This action can search any text and extract all references to dates or times, including structured dates and times like 9:30:00 PM
or 11/23/2020
, and unstructured times like 9PM
or next week
.
This action creates a data table to store all matches and match information. The action also converts any unstructured items into structured MM/DD/YY
or HH:MM:SS
formats.
Use case
The Text: Find dates and date-times action is useful for collecting important information from incoming text to use in analysis or future manual tasks.
For example, use this action to collect information from clients and pre-populate emails with proposed times, or use it in conjunction with the Cognitive: Identify key phrases to create a report for each incoming customer ticket.
How to configure this action
Fields for this action
-
Text to search
- Enter a block of text or field reference to text. The action will search through this text.
-
Return Field Name
- To help keep output fields organized, choose an output field prefix to add to the beginning of each output field name as this action may output more than one field.
-
The step’s name is used as the prefix by default.
-
Reference date
- To assess date references like “tomorrow” or “next week”, enter the date which all results will be relative too. The date should be in
MM/DD/YYYY
format. If blank, this defaults to the current date.
- To assess date references like “tomorrow” or “next week”, enter the date which all results will be relative too. The date should be in
What will this output?
This action may generate multiple fields. To help keep output fields organized, the return field name above will be added to the beginning of each of the output field names, separated by two dashes. Each field will result as:{{return-field-name--output-field}}
.
Output fields for this action
-
First Match
- Returns just the first match of the action. The remaining matches are stored in the associated data table.
-
Number of dates found
- The total number of dates or date-times found.
-
Data Table
- This field provides the ID for a Data Table that stores the matches. The table will have 7 columns:
- Original Date: Date or time matched from text, in descending order from first match.
- Converted Date: The original date converted into
MM/DD/YY HH:MM:SS
format. - Date: Date converted to
MM/DD/YY
format. - Date-time: Time references converted to
MM/DD/YY HH:MM:SS
format. - Time: Time references converted to HH:MM:SS format.
- Type: Identifies if the match is a
date
ordate-time
- Start Index: The starting position of the match in the text. The position is the number of characters from the start of the text until the match.
- This field provides the ID for a Data Table that stores the matches. The table will have 7 columns:
Thanks for your feedback
We update the Help Center daily, so expect changes soon.
Link Copied
Paste this URL anywhere to link straight to the section.