PROCESIO
OverviewPlatform ActionsIntegrations & DemosMarketplaceCustom ActionsDeveloper’s Guide

String To DateTime

Reads a date and time from text, using the format and language you give.

String To DateTime turns text such as 15/06/2024 13:45 or 15 iunie 2024 into a Date and time value that the other DateTime actions can work with. You tell it how the text is written (the Format) and which language month and day names are in. Use it for dates that arrive as text: from an API, an email, a CSV or Excel file, or a form.

Add the action

In the Process Designer toolbox, open DateTime and pick String To DateTime (or type String To DateTime in the search box).

The String To DateTime action properties: String, Language, Format, Format List, Datetime and Exact Format Parsing

Inputs and outputs

FieldDirectionTypeRequiredWhat to put / what you get
StringInputTextYesThe text that contains the date.
LanguageInputOption listYesThe language of month and day names in the text, and the default date order. Options: Română (RO), English (UK), English (US), Ελληνικά (GR), Español (ES), 中国人 (CN), Pусский (RU), Deutsch (DE), हिन्दी (IN), عربي (UAE), Français (FR). Default English (US).
FormatInputTextNo*How the text is written, for example dd/MM/yyyy HH:mm.
Format ListInputList of TextNo*Several formats to try, when the text can come in more than one shape. Map a list variable here.
DatetimeOutputDate and timeYesThe date and time read from the text.
Exact Format ParsingOutputBoolean (true/false)Notrue when the text matched your Format or one of the Format List entries. false when it did not match and the action read it in the language's usual way instead (see Good to know).

* Fill in Format or Format List. If both are empty, the step stops with Format Error: Please provide a non-empty Format !. When Format List has at least one entry, Format is ignored.

Format codes

The most used codes (they are case-sensitive):

CodeMeaningExample
yyyyYear, 4 digits2024
MM / MMonth, 2 digits / 1–2 digits06 / 6
MMM / MMMMMonth name, short / full, in the chosen LanguageJun / June, iunie
dd / dDay of the month05 / 5
HHHour, 24-hour clock13
hh + ttHour, 12-hour clock, with AM/PM01 PM
mmMinutes45
ssSeconds30
zzzUTC offset+03:00
'text'Fixed text, copied as it is'Generated on '

The full list is in Microsoft's custom date and time format strings.

Example

StringLanguageFormat / Format ListDatetimeExact Format Parsing
15/06/2024 13:45English (UK)dd/MM/yyyy HH:mm2024-06-15T13:45:00true
15 iunie 2024Română (RO)dd MMMM yyyy2024-06-15T00:00:00true
06/15/2024 01:45 PMEnglish (US)MM/dd/yyyy hh:mm tt2024-06-15T13:45:00true
Generated on 2026-02-11 14:35.English (US)'Generated on 'yyyy-MM-dd HH:mm'.'2026-02-11T14:35:00true
2024.06.15English (US)Format List ["dd/MM/yyyy", "yyyy.MM.dd"]2024-06-15T00:00:00true
2024-06-15 13:45 +03:00English (US)yyyy-MM-dd HH:mm zzz2024-06-15T10:45:00+00:00true
2024-06-15 13:45English (US)dd/MM/yyyy (does not match)2024-06-15T13:45:00false
15 iunie 2024English (US)dd MMMM yyyystep fails: Parsing Error: Wrong format / Wrong language, unable to parse => 15 iunie 2024
31/02/2024English (UK)dd/MM/yyyystep fails: no 31 February

Good to know

  • Fallback when the format does not match. If the text does not match your format, the action still tries to read it the usual way for the chosen Language. If that works, you get a date and Exact Format Parsing is false. Check that output when the order of day and month matters: with the fallback, 05/10/2010 is read as 10 May 2010 in English (US) and as 5 October 2010 in English (UK). If the fallback fails too, the step stops with the Parsing Error above.
  • Invalid dates are refused: 31/02/2024 or 29/02/2023 stop the step. An empty String stops it too.
  • Fixed text must be in single quotes. Letters such as d, M, y, h, m, s, t are format codes. Write words that are part of the text inside '…', as in the Generated on example.
  • Hours: use HH for 0–23 and hh with tt for 1–12 with AM/PM. Mixing them up gives wrong times or a parsing error.
  • Time zone: text with an offset (+03:00) is converted to UTC. Text without an offset is kept as it is, with no time zone.
  • With Format List, the text only has to match one of the formats.

On this page