Format DateTime
Turns a date and time into text, in exactly the format and language you write.
Format DateTime writes a Date and time value as text, in a format you write yourself, for example Saturday, 15 June 2024 or 2024-06-15_1345. Use it for file names, email subjects, documents and API fields that expect a specific date shape. If one of the standard shapes is enough, DateTime To String lets you pick it from a list.
Add the action
In the Process Designer toolbox, open DateTime and pick Format DateTime (or type Format DateTime in the search box).

Inputs and outputs
| Field | Direction | Type | Required | What to put / what you get |
|---|---|---|---|---|
| Datetime | Input | Date and time | Yes | The date and time to format. |
| Language | Input | Option list | Yes | The language for month and day names. 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). |
| Format | Input | Text | Yes | The format to write, built from the codes below. |
| Formatted Datetime | Output | Text | Yes | The date as text. |
Format codes
| Code | Meaning | Example (15 June 2024, 13:45:30) |
|---|---|---|
yyyy / yy | Year | 2024 / 24 |
MM / M | Month number | 06 / 6 |
MMM / MMMM | Month name, short / full | Jun / June |
dd / d | Day of the month | 15 |
ddd / dddd | Day name, short / full | Sat / Saturday |
HH | Hour, 24-hour clock | 13 |
hh + tt | Hour, 12-hour clock, with AM/PM | 01 PM |
mm | Minutes | 45 |
ss | Seconds | 30 |
zzz | UTC offset | +00:00 |
'text' | Fixed text, copied as it is | 'Report of' |
The full list is in Microsoft's custom date and time format strings.
Example
All rows use the Datetime 2024-06-15T13:45:30.
| Language | Format | Formatted Datetime |
|---|---|---|
| English (US) | dddd, dd MMMM yyyy HH:mm | Saturday, 15 June 2024 13:45 |
| Română (RO) | dddd, dd MMMM yyyy HH:mm | sâmbătă, 15 iunie 2024 13:45 |
| Français (FR) | dd MMM yyyy | 15 juin 2024 |
| English (US) | hh:mm tt | 01:45 PM |
| English (US) | yyyy-MM-ddTHH:mm:ss | 2024-06-15T13:45:30 |
| English (US) | 'Report of' d MMM | Report of 15 Jun |
| English (US) | d | 6/15/2024 |
Good to know
- One letter alone is a standard format, not a code:
dgives the short date (6/15/2024), not the day15. To get only the day number, use Get Day. - Words in the format need single quotes, otherwise their letters are read as codes: write
'Report of' d MMM, notReport of d MMM. - Time zone: a value with a UTC offset is converted to UTC first.
2024-06-15T13:45:30+03:00withyyyy-MM-dd HH:mm zzzgives2024-06-15 10:45 +00:00. To show local time, convert it first with Timezone Converter. - An empty Format stops the step with
Format Error: Please provide a non-empty Format !. A format that is not valid (for example%alone) stops it withInput string was not in a correct format.

