# Date Format

The *Date Format* action node is used to reformat a date input into another specified format.&#x20;

This node is typically used after a [*Request Input*](/flow/user-facing-nodes/input-nodes/menu-nodes-ask-for-input.md) node, where a user is required to provide a date or an API call where a date is returned.&#x20;

If the date was formatted without exceptions, the action node will return "Yes". Else it will return "No", including parse exceptions.

For example, if a user enters a date in yyyy-MM-dd format and we want to convert it into dd-MM-yyyy format, you can use the *Date Format* node. After a successful conversion, the node will return a "Yes" response. If the conversion failed, the node will return a "No" response.

<figure><img src="/files/mIVK96ZxBIK8ZRzWGJxP" alt="" width="563"><figcaption><p>Setup of a Date Format node</p></figcaption></figure>

![Example flow containing Date Format node](/files/-MeiA0Y8hpg6I_XIrXDN)

### &#xD; Examples

The table below lists the common letters that can be used to specify the date format patterns in Chat Flow:

| **Letter** | **Date or Time Component**                       | **Examples**                          |
| ---------- | ------------------------------------------------ | ------------------------------------- |
| y          | Year                                             | 1996; 96                              |
| Y          | Week year                                        | 2009; 09                              |
| M          | Month in year (context sensitive)                | July; Jul; 07                         |
| L          | Month in year (standalone form)                  | July; Jul; 07                         |
| w          | Week in year                                     | 27                                    |
| W          | Week in month                                    | 2                                     |
| D          | Day in year                                      | 189                                   |
| d          | Day in month                                     | 10                                    |
| F          | Day of week in month                             | 2                                     |
| E          | Day name in week                                 | Tuesday; Tue                          |
| u          | Day number of week (1 = Monday, ..., 7 = Sunday) | 1                                     |
| a          | Am/pm marker                                     | PM                                    |
| H          | Hour in day (0-23)                               | 0                                     |
| k          | Hour in day (1-24)                               | 24                                    |
| K          | Hour in am/pm (0-11)                             | 0                                     |
| h          | Hour in am/pm (1-12)                             | 12                                    |
| m          | Minute in hour                                   | 30                                    |
| s          | Second in minute                                 | 55                                    |
| S          | Millisecond                                      | 978                                   |
| z          | Timezone                                         | Pacific Standard Time; PST; GMT-08:00 |
| Z          | Timezone                                         | -08:00                                |
| X          | Timezone                                         | -08; -08:00; -08:00                   |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://guides.clickatell.com/flow/action-nodes/action-nodes-date-format.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
