# Convert date to a string

Source: [https://docs.virtosoftware.com/docs/virto-workflow-automation-app/virto-workflows-for-office-365/string-activities/convert-date-to-a-string/](https://docs.virtosoftware.com/docs/virto-workflow-automation-app/virto-workflows-for-office-365/string-activities/convert-date-to-a-string/)
Product: Virto Workflow Automation App
Updated: 2026-08-12


This activity converts date to a string in custom format and stores the result.

![Convert date to a string activity in the Virto string activities workflow](https://img-docs.virtosoftware.com/wp-content/uploads/2024/10/convert_date_to_a_string_1.png)

## **Parameters**

Input parameters


| Parameter | Description | Example |
|---|---|---|
| The following date | DateTime value which you want to convert to string. | CurrentItem:Created 12/12/2016 |
| The following format (optional) | .Net format string which you want to use for converting dare to string. See MSDN online for custom date time formats. | M/d/yyyy M/d/yy MM/dd/yy MM/dd/yyyy yy/MM/dd yyyy-MM-dddd-MMM-yy |
| Variable | retVal (set by this activity). Contains result of DateTime conversion to string. |  |


Example

![Example workflow converting a DateTime value to a string using a custom .NET format](https://img-docs.virtosoftware.com/wp-content/uploads/2024/10/convert_date_to_a_string_2.png)
