> For the complete documentation index, see [llms.txt](https://documentation-phonon-io.gitbook.io/central/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation-phonon-io.gitbook.io/central/widgets/functions/date-and-time-manipulation.md).

# Date And Time Manipulation

Using 'Date and Time' manipulation, you can perform different operations on date, time or date and time.  The operations are

### 1. Find Duration -&#x20;

By using this operation, you can find duration between any two date, time or date and time. For that you have to provide

1. Input : can be variable or value&#x20;
2. Format : The format in which the date and time will be present&#x20;
3. Unit of duration : The unit in which output will be stored, eg - hours, days, minutes etc.
4. Store in : The variable in which you want to store the result.

![](https://285793208-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LTfGJN4r0uAh7HIsQzW%2F-MCvszJVYZFdOXdB7xtq%2F-MCvwfPdJL2uZgq9Lnh-%2Fpicture5.png?alt=media\&token=81d04436-3817-47a5-8932-f62b7c5f1a2a)

### 2. Add Duration&#x20;

By using this operation, you can add any kind of duration to the date,time or date and time. For that you have to provide

1. Input : can be variable or value&#x20;
2. Format : The format in which the date and time will be present&#x20;
3. Duration : The duration which you want to add.
4. Store in : The variable in which you want to store the result.

![](https://285793208-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LTfGJN4r0uAh7HIsQzW%2F-MCvszJVYZFdOXdB7xtq%2F-MCvyM0VKjjlyK-FSY6z%2Fpicture5.png?alt=media\&token=95e1137d-c989-422f-9662-7d6ceb4c7298)

### 3. Subtract Duration&#x20;

By using this operation, you can subtract any kind of duration to the date,time or date and time. For that you have to provide

1. Input : can be variable or value&#x20;
2. Format : The format in which the date and time will be present&#x20;
3. Duration : The duration which you want to subtract.
4. Store in : The variable in which you want to store the result.

![](https://285793208-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LTfGJN4r0uAh7HIsQzW%2F-MCvszJVYZFdOXdB7xtq%2F-MCvytgae647tFcmXF33%2Fpicture5.png?alt=media\&token=6da5728d-1cfe-465d-94f5-18ec69449fe5)

### 4. Extract/Change Format

By using this operation, you can either extract particular part of the date,time or date and time or change the format of date, time or date and time. For that you will have to provide -

1. Input : can be variable or value&#x20;
2. Format 1 : The format in which the date and time will be present&#x20;
3. Format 2 : The second format in which you want to change or extract.
4. Store in : The variable in which you want to store the result.

![](https://285793208-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LTfGJN4r0uAh7HIsQzW%2F-MCvszJVYZFdOXdB7xtq%2F-MCvztx-KYVc7HCe6iNL%2Fpicture5.png?alt=media\&token=31f497d9-3ab7-468c-aee0-72b68767e661)
