How to call the current date & change the date format

In order to call/ reference the current date, you need to do the following.

  1. Add a Calculator step in your flow.
  2. You can customize your code to suit the required output.

Below is the code that is used in the calculator step to get the current date .

You can copy the code below code and paste it in your Calculator step.

let inputRecord = utils.dayjs(new Date().inputRecord).format(‘DD-MM-YYYY’);
return inputRecord;

In the above code, it pulls the current date from your local machine and formats it to DD-MM-YYYY. You can change the format of the date to your desire.

Illustrated in the below image is the output/ result.


The below link assists with the different formats that can be used in the date:

Format · Day.js