# Date/Time Formatter Premium Action

With the Date/Time Formatter action, you can reformat the Date or Date and Time as per your requirement. You can also compare dates using the action.

* Format Date
* Format Date and Time
* Compare Dates

![](https://t8631005.p.clickup-attachments.com/t8631005/567591ee-c381-4e04-a924-9c805eaef501/Screenshot%202023-03-28%20at%2011.16.07%20AM.png)

###

## Format Date

To convert date structure from one format to another.

### Field:

Select any date field, you can select a Specific Date, Current Date, from Contact’s date fields or date type custom fields, Appointment start/end date, Custom values or even from Inbound Webhook Trigger.

###

![](https://t8631005.p.clickup-attachments.com/t8631005/8f1d0582-d04f-4fc1-a36d-ed34a93b39e8/Screenshot%202023-04-06%20at%209.54.31%20AM.png)

### From Format:

If you select any of the system fields like Specific Date, Current Date, from Contact’s date type standard fields, Contact’s date type custom fields, Appointment start or end date it will auto detect the format and preselect the same. If it is a Custom Value or from Inbound Webhook trigger you will have to select the exact matching format.

![](https://t8631005.p.clickup-attachments.com/t8631005/dae0bfed-7184-47d1-ae0b-7d70cdb63622/Screenshot%202023-04-06%20at%2010.00.35%20AM.png)

### To Format:

Select the required format from the list

![](https://t8631005.p.clickup-attachments.com/t8631005/eb63130e-16e8-4e6d-b009-50c50d92b1f7/Screenshot%202023-04-06%20at%2010.01.16%20AM.png)

### Output

After setting up the Format Date, you can use the results in further actions in your Workflow.

\{{datetime\_formatter.1.date\}}

Custom Values

###

![](https://t8631005.p.clickup-attachments.com/t8631005/7b5b0ac1-32aa-4ad7-81ae-d4ef0b081a8e/Screenshot%202023-04-06%20at%2011.08.53%20AM.png)

***

## Format Date and Time

To convert date and time structure from one format to another

### Field:

Select any date time field, you can select a Specific Date and Time, Current Date and Time, Appointment start or end date time, Custom values or even from Inbound Webhook Trigger.

Currently Contact Custom fields does not support Date Time structure.

###

![](https://t8631005.p.clickup-attachments.com/t8631005/5df3c4a4-2101-422c-a9d1-85c370dbd991/Screenshot%202023-04-06%20at%209.54.31%20AM.png)

### From Format:

If you select any of the system fields like Specific Date and Time, Current Date and Time, Contact fields, Appointment start or end date time it will auto detect the format and preselect the same. If it is a Custom Value or from Inbound Webhook trigger you will have to select the exact matching format.

![](https://t8631005.p.clickup-attachments.com/t8631005/67d83db7-546c-4a66-8800-6719094292a4/Screenshot%202023-04-06%20at%2010.58.07%20AM.png)

### To Format:

Select the required format from the list

![](https://t8631005.p.clickup-attachments.com/t8631005/a6ee443e-ed59-43b7-ae6a-80ce3ac54c9b/Screenshot%202023-04-06%20at%2010.58.14%20AM.png)

### Output

After setting up the Format Date and Time, you can use the results in further actions in your Workflow.

\{{datetime\_formatter.1.datetime\}}

Custom Values

![](https://t8631005.p.clickup-attachments.com/t8631005/b77672c3-80a5-4cfb-a971-19afa2821711/Screenshot%202023-04-06%20at%2011.13.50%20AM.png)

***

## Compare Dates

Compare two dates and get the difference in number of days

### Start Date:

Select any date field, you can select a Specific Date, Current Date, from Contact’s date fields or date type custom fields, Appointment start/end date, Custom values or even from Inbound Webhook Trigger.

![](https://t8631005.p.clickup-attachments.com/t8631005/665f6443-949d-414d-bda6-9e4f121eaedf/Screenshot%202023-04-06%20at%2011.00.20%20AM.png)

### Start Date Format:

If you select any of the system fields like Specific Date, Current Date, from Contact’s date type standard fields, Contact’s date type custom fields, Appointment start or end date it will auto detect the format and preselect the same. If it is a Custom Value or from Inbound Webhook trigger you will have to select the exact matching format.

![](https://t8631005.p.clickup-attachments.com/t8631005/102dc06e-d365-446d-aafe-3a1ce19bf8c3/Screenshot%202023-04-06%20at%2011.01.11%20AM.png)

### End Date:

Select any date field, you can select a Specific Date, Current Date, from Contact’s date fields or date type custom fields, Appointment start/end date, Custom values or even from Inbound Webhook Trigger.

![](https://t8631005.p.clickup-attachments.com/t8631005/0323b2b6-1b3e-45f8-9ed0-18df285800f7/Screenshot%202023-04-06%20at%2011.00.20%20AM.png)

### End Date Format:

If you select any of the system fields like Specific Date, Current Date, from Contact’s date type standard fields, Contact’s date type custom fields, Appointment start or end date it will auto detect the format and preselect the same. If it is a Custom Value or from Inbound Webhook trigger you will have to select the exact matching format.

![](https://t8631005.p.clickup-attachments.com/t8631005/9fa6582a-1fec-4a62-bfa8-e3e4e05a4c61/Screenshot%202023-04-06%20at%2011.01.18%20AM.png)

### Output

After setting up the Compare Dates, you can use the results in further actions in your Workflow. \{{datetime\_formatter.1.days\}}

The difference is calculated as End Date - Start Date, so if the Start Date is greater than the End Date you will get negative value.

Custom Values

![](https://t8631005.p.clickup-attachments.com/t8631005/58ffa0a9-3bbe-4c65-bcb6-b696a45c3d0f/Screenshot%202023-04-06%20at%2011.14.09%20AM.png)

***

### Usage

* Format the Inbound Webhook Trigger data to Set Event Start Date, to update Contact Custom Fields, to compare in If/Else Condition
* Lets say the date format is MM/DD/YYYY but you need to send it to an app that formats dates as DD/MM/YYYY, you can use the Date/Time Formater to change the date format and send it via Custom Webhook.
* Store the custom formatted date time info in Google Sheets
* Use the custom formatted date time info in Email/SMS/Slack
* Compare Current date(Start Date) with Invoice Due date(End Date) and use the dynamic value in Email/SMS/Slack,

Eg: Your Invoice is due in \{{datetime\_formatter.1.days\}} days,

Note: On overdue, that is when Current Date(Start Date) is greater than the Invoice Due Date(End Date) you will get the result in negative value
