---
title: Format Date
slug: format-date
docTags: 
createdAt: 2022-09-07T02:22:08.000Z
---

Converts a given valid ISO date to a desired output format. format placeholders supported are as follows

### API Definition

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://orca.pathfix.com/functions/datetime/format",
  "name": "Format API",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "28UsDqyeH3QRdmtVamSQT",
        "code": "{\n    \"output\": \"1 Sep, 2009\"\n}",
        "language": "200"
      },
      {
        "id": "yIX64DyIuDPJgBRFSfAWb",
        "code": "{\n    \"message\": \"error\"\n}",
        "language": "404"
      }
    ],
    "selectedLanguageId": "28UsDqyeH3QRdmtVamSQT"
  },
  "examples": {
    "languages": [
      {
        "id": "ENcJz9TStG38F0X-taA4x",
        "code": "{\r\n\t\"input\": \"2009-06-01T13:45:30\",\r\n\t\"format\": \"dd MMM, yyyy\",\r\n\t\"target\": \"Bruce\"\r\n}",
        "language": "json"
      }
    ],
    "selectedLanguageId": "ENcJz9TStG38F0X-taA4x"
  },
  "description": "\nCall the following API:",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  }
}
```
:::




### &#xD;&#xA;Format Specifiers

| Format Specifiers | Description                                   |
| ----------------- | --------------------------------------------- |
| "d"               | The day of the month, from 1 through 31       |
| "dd"              | The day of the month, from 01 through 31      |
| "ddd"             | The abbreviated name of the day of the week   |
| "dddd"            | The full name of the day of the week          |
| "h"               | The hour, using a 12-hour clock from 1 to 12  |
| "hh"              | The hour, using a 12-hour clock from 01 to 12 |
| "H"               | The hour, using a 24-hour clock from 0 to 23  |
| "HH"              | The hour, using a 24-hour clock from 00 to 23 |
| "m"               | The minute, from 0 through 59                 |
| "mm"              | The minute, from 00 through 59.               |
| "M"               | The month, from 1 through 12                  |
| "MM"              | The month, from 01 through 12                 |
| "MMM"             | The abbreviated name of the month             |
| "MMMM"            | The full name of the month                    |
| "y"               | The year, from 0 to 99                        |
| "yy"              | The year, from 00 to 99                       |
| "yyyy"            | The year as a four-digit number               |




