# DATE.SET

The DATE.SET() function can be used to change the format of a date. Refer to [Microsoft's date format codes ](https://learn.microsoft.com/en-us/system-center/orchestrator/standard-activities/format-date-time?view=sc-orch-2022)to view all the supported format models. The input date should be in MM/DD/YYYY format.

## Syntax

```javascript
date.set(date, format_model)
```

## Arguments

date - The date which is passed as input to the function.&#x20;

format\_model - The new date format to be applied to the input date

## Return value

Date

## Example

```javascript
DATE.SET('03/01/2023', 'YYYYMMDD')
```

Returns 20230301.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FP8YUkq1A01JReeLZHboj%2Fimage.png?alt=media&#x26;token=f8b7d971-ca13-49cc-a4ac-17feb289e6dd" alt=""><figcaption><p>DATE.SET function</p></figcaption></figure>
