# Filename in Data format

**URL:** <https://community.automationedge.com/t/filename-in-data-format/2313>\
**Category:** Get Help & Discuss\
**Tags:** rpa\
**Created:** [July 7, 2020, 7:18am UTC](https://community.automationedge.com/t/filename-in-data-format/2313 "2020-07-07T07:18:03Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![zack](https://avatars.discourse-cdn.com/v4/letter/z/f6c823/32.png) [@zack](https://community.automationedge.com/u/zack)\
**Post date:** [July 7, 2020, 7:18am UTC](https://community.automationedge.com/t/filename-in-data-format/2313/1 "2020-07-07T07:18:03Z")

</div>

using Automation, how to give the name of a file in data format(ddMMyyyyHHmm).  
Ex:-upload070720201247.csv

---

<div class="post-metadata">

**Author:** ![aesupport](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.automationedge.com/aesupport/32/371_2.png) [@aesupport](https://community.automationedge.com/u/aesupport)\
**Post date:** [July 7, 2020, 7:39am UTC](https://community.automationedge.com/t/filename-in-data-format/2313/2 "2020-07-07T07:39:30Z")

</div>

Could you please elaborate more, In which case you need this filename: Input/Output?

---

<div class="post-metadata">

**Author:** ![zack](https://avatars.discourse-cdn.com/v4/letter/z/f6c823/32.png) [@zack](https://community.automationedge.com/u/zack)\
**Post date:** [July 7, 2020, 7:47am UTC](https://community.automationedge.com/t/filename-in-data-format/2313/3 "2020-07-07T07:47:17Z")

</div>

I’m storing my output data into excel writer but condition is here that filename should be in date format (ddMMyyyyHHmm). How to do this? I have checked predefined data format but i need in this format how to do.  
Ex:-upload070720201247.xlsx

---

<div class="post-metadata">

**Author:** ![aesupport](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.automationedge.com/aesupport/32/371_2.png) [@aesupport](https://community.automationedge.com/u/aesupport)\
**Post date:** [July 7, 2020, 8:23am UTC](https://community.automationedge.com/t/filename-in-data-format/2313/4 "2020-07-07T08:23:26Z")

</div>

You have to create your filename in **Modified Java Script Value** Step as below:

var Current\_Date=new Date();  
Current\_Date=date2str(Returning\_Date,“ddMMyyyyHHmm”);

var Filename=“upload”+Current\_Date;  
var Filepath=“D:\AutomationEdge\”+Filename; &nbsp; \\ Where “D:\AutomationEdge\” is path to save output file.

And in output Filename field, pass “Filepath” variable instead of path.

---

<div class="post-metadata">

**Author:** ![zack](https://avatars.discourse-cdn.com/v4/letter/z/f6c823/32.png) [@zack](https://community.automationedge.com/u/zack)\
**Post date:** [July 7, 2020, 9:05am UTC](https://community.automationedge.com/t/filename-in-data-format/2313/5 "2020-07-07T09:05:49Z")

</div>

Thanks for solving issue.

---

<div class="post-metadata">

**Author:** ![jmr](https://avatars.discourse-cdn.com/v4/letter/j/d6d6ee/32.png) [@jmr](https://community.automationedge.com/u/jmr)\
**Post date:** [September 10, 2021, 1:59am UTC](https://community.automationedge.com/t/filename-in-data-format/2313/6 "2021-09-10T01:59:48Z")

</div>

Hi,

Sorry beginner here.

How to pass the variable “Filepath” on the Filename field?

---

<div class="post-metadata">

**Author:** ![KalyaniW](https://avatars.discourse-cdn.com/v4/letter/k/71e660/32.png) [@KalyaniW](https://community.automationedge.com/u/KalyaniW)\
**Post date:** [September 13, 2021, 6:38am UTC](https://community.automationedge.com/t/filename-in-data-format/2313/7 "2021-09-13T06:38:59Z")

</div>

Please check the below solution

> [@Pass variable as output filename](https://community.automationedge.com/t/pass-variable-as-output-filename/4740/4):
>
> Yes it is possible, in the Modified JavaScript step there is a button called Get Variables, you can click on it and all the variables declared in the JavaScript will appear as an output, so select the desired variable and pass it to the next step. I’ve attached the screenshot for your reference.
