# Get Current Date

**URL:** https://community.automationedge.com/t/get-current-date/2421
**Category:** Get Help & Discuss
**Created:** [July 29, 2020, 8:47am UTC](https://community.automationedge.com/t/get-current-date/2421 "2020-07-29T08:47:08Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![sonam](https://avatars.discourse-cdn.com/v4/letter/s/5fc32e/32.png) [@sonam](https://community.automationedge.com/u/sonam)
#### Post date: [July 29, 2020, 8:47am UTC](https://community.automationedge.com/t/get-current-date/2421/1 "2020-07-29T08:47:08Z")

</div>

Hi Team,

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

---

<div class="post-metadata">

### Author: ![AE\_Support](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.automationedge.com/ae_support/32/354_2.png) [@AE\_Support](https://community.automationedge.com/u/AE_Support)
#### Post date: [July 29, 2020, 9:03am UTC](https://community.automationedge.com/t/get-current-date/2421/2 "2020-07-29T09:03:57Z")

</div>

Hi Sonam,

Write below code in Modified javascript:

var current\_date=Date();

---

<div class="post-metadata">

### Author: ![sonam](https://avatars.discourse-cdn.com/v4/letter/s/5fc32e/32.png) [@sonam](https://community.automationedge.com/u/sonam)
#### Post date: [July 29, 2020, 9:43am UTC](https://community.automationedge.com/t/get-current-date/2421/3 "2020-07-29T09:43:37Z")

</div>

> [@AE\_Support](#):
>
> 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.

---

<div class="post-metadata">

### Author: ![wllmdjngh](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.automationedge.com/wllmdjngh/32/952_2.png) [@wllmdjngh](https://community.automationedge.com/u/wllmdjngh)
#### Post date: [July 29, 2020, 10:39pm UTC](https://community.automationedge.com/t/get-current-date/2421/4 "2020-07-29T22:39:11Z")

</div>

Hi Sonam,  
You can also use Get System Info.

---

<div class="post-metadata">

### Author: ![Ankita1](https://avatars.discourse-cdn.com/v4/letter/a/d07c76/32.png) [@Ankita1](https://community.automationedge.com/u/Ankita1)
#### Post date: [July 30, 2020, 5:38am UTC](https://community.automationedge.com/t/get-current-date/2421/5 "2020-07-30T05:38:44Z")

</div>

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](https://canada1.discourse-cdn.com/flex027/uploads/automationedge/original/1X/ddc6dcdb05b9d2dba67fb76f4d78683a8c4c5a9b.png)

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](https://canada1.discourse-cdn.com/flex027/uploads/automationedge/original/1X/d89d64ce653b3420ea16862c5716417bad11dd71.png)

Workflow Execution:  
 ![image](https://canada1.discourse-cdn.com/flex027/uploads/automationedge/original/1X/b2cb540a189d83944dc471aecc7bc958444440d6.png)

---

<div class="post-metadata">

### Author: ![sonam](https://avatars.discourse-cdn.com/v4/letter/s/5fc32e/32.png) [@sonam](https://community.automationedge.com/u/sonam)
#### Post date: [July 30, 2020, 6:06am UTC](https://community.automationedge.com/t/get-current-date/2421/6 "2020-07-30T06:06:57Z")

</div>

Thanks Ankita. Its working as expected.

---

<div class="post-metadata">

### Author: ![Ankita1](https://avatars.discourse-cdn.com/v4/letter/a/d07c76/32.png) [@Ankita1](https://community.automationedge.com/u/Ankita1)
#### Post date: [July 30, 2020, 6:08am UTC](https://community.automationedge.com/t/get-current-date/2421/7 "2020-07-30T06:08:55Z")

</div>

That’s Great Sonam !
