# 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.

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

## Return value

Date

## Example

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

Returns 20260301.

<figure><img src="/files/w0Z4lLrCos3qkaLuVsje" alt=""><figcaption></figcaption></figure>

<figure><img src="https://github.com/lumelinc/PowerTableDocs/blob/main/.gitbook/assets/image%20(779).png" alt=""><figcaption><p>DATE.SET function</p></figcaption></figure>


---

# 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://docs.fabricplan.com/planning-sheets/formula-syntax/date-functions/date.set.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.
