System date as a filename

  • Last Post 5 days ago
  • Topic Is Solved
Sunil Edupuganti posted this 6 days ago


I am taking the excel output from my project. So i need to set the System Date to the Exported Excel as file name. 


I am generating the System date in one of my field, If i am using that field the output is not in a correct way. It is creating one folder with month and inside that folder, it is creating another folder with date and inside that folder my excel output is there with the year as a file name.


But what i need is to get the date as a file name to my excel output. How could i do that....??

Order By: Standard | Newest | Votes
Vladimir Dimitrijevic posted this 5 days ago

Hi Sunil,

Directories are probably created because of slashes in date. As you are using DateTime.Now.ToShortDateString, you should change it to DateTime.Now.ToString("MMddyyyy") - the result would be 12062017 for 06th December 2017. Date will be shown without slashes, and then file should be saved as "12062017.xls" in your export directory.


Best regards,


Sunil Edupuganti posted this 5 days ago

Thank you so much...