# Formats

FlowScript supports converting numeric values and date times to string with a provided format string. This is performed with the **format** function.

### **Numeric values**

<table data-header-hidden><thead><tr><th>Format            </th><th width="200">Description</th><th>Example (value: 1234.567)</th><th>Example Result</th></tr></thead><tbody><tr><td>Format            </td><td>Description</td><td>Example (value: 1234.567)</td><td>Example Result</td></tr><tr><td>"C"</td><td>A currency value.*</td><td>"C" (en-US)<br> "C" (sv-SE)</td><td>"$1,234.57"<br> "1.234,57 kr"</td></tr><tr><td>"F"</td><td>Integral and decimal digits with optional negative sign.*</td><td>"F" (en-US)<br> "F" (de-DE)</td><td>"1234.57"<br> "1234,57"</td></tr><tr><td>"F<strong>n</strong>" (ex "F1")</td><td>Same as "F" with <strong>n</strong> precision (Number of decimal digits.)*</td><td>"F1" (en-US)<br> "F3" (de-DE)</td><td>"1234.6"<br> "1234,567"</td></tr><tr><td>"N"</td><td>Integral and decimal digits, group separators, and a decimal separator with optional negative sign.*</td><td>"N" (en-US)<br> "N" (ru-RU)</td><td>"1,234.57"<br> "1 234,57"</td></tr><tr><td>"N<strong>n</strong>" (ex "N1")</td><td>Same as "N" with <strong>n</strong> precision (Number of decimal digits.)*</td><td>"N1" (en-US)<br> "N3" (ru-RU)</td><td>"1,234.6"<br> "1 234,567"</td></tr></tbody></table>

\* The result is formatted based on the locale of the computer where the Flow Engine is executing. Some FlowScript functions support overriding the locale.

> Read more about .NET Date and Time format strings here:\
> &#x20;<http://msdn.microsoft.com/en-us/library/dwhawy9k.aspx>

### **Date and time format**

| Format | Description                               | Example (date: 2009-06-15T13:45:30)              | Example Result                   |
| ------ | ----------------------------------------- | ------------------------------------------------ | -------------------------------- |
| "d"    | The day of the month, from 1 through 31.  | "d"                                              | "15"                             |
| "dd"   | The day of the month, from 01 through 31. | "dd"                                             | "15"                             |
| "dddd" | The full name of the day of the week.\*   | "dddd" (en-US)                                   | "Monday"                         |
| "M"    | The month, from 1 through 12.             | "M"                                              | "6"                              |
| "MM"   | The month, from 01 through 12.            | "MM"                                             | "06"                             |
| "MMM"  | The abbreviated name of the month.\*      | "MMM" (en-US)                                    | "Jun"                            |
| "MMMM" | The full name of the month.\*             | "MMMM" (en-US)                                   | "June"                           |
| "yy"   | The year, from 00 to 99.                  | "yy"                                             | "09"                             |
| "yyyy" | The year as a four-digit number.          | "yyyy"                                           | "2009"                           |
| ":"    | The time separator.\*                     | <p>"HH:mm" (en-US)<br> "HH:mm" (ar-DZ)</p>       | <p>"13:45"<br> "13.45"</p>       |
| "/"    | The date separator.\*                     | <p>"yy/MM/dd" (en-US)<br> "yy/MM/dd" (ar-DZ)</p> | <p>"09/06/15"<br> "09-06-15"</p> |
| "\\"   | The escape character.                     | "\M M"                                           | "M 6"                            |

\* Language/format is defined by the computer where the Flow Engine is executing.

> Read more about .NET Date and Time format strings here:\
> &#x20;<http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx>
