Get Current Date

Hi Team,

If I want to get the current date then how can that be done in PS.

Hi Sonam,

Write below code in Modified javascript:

var current_date=Date();

var current_date=new Date();
Above format is the correct format to get current date.

Also if I want to fetch the current date which I have received from Modified Java Script into some text file how can that be achieved. If I use text file output to get the current date from Modified Java then I am just getting the variable name but not its value.

Hi Sonam,
You can also use Get System Info.

Hi Sonam,

There are multiple ways to fetch Current date:

  1. Using Get System Info Step : This step has two function System date(Fixed) and System date(Variable) which can be used to get current date.
    Refer the image below:

image

  1. Using Modified Java Script : In this step we can write the script to fetch the date .
    Refer the image below:
    Script to write:
    image

Workflow Execution:
image

Thanks Ankita. Its working as expected.

That’s Great Sonam !