The CreatorCon Call for Content is officially open! Get started here.

How to change File name in Midserver

Sironi
Kilo Sage

Hi All,

 

Kindly help me how to change file name in Mid-Server.

 

Scheduled Data Export job running properly but filename timestamp coming wrongly

 

Everyday Job Runs at 01:00:00 AM EST, but file name timestamp coming with 3hrs back .

Example : Job runs on 2024-04-17 01:00:00 AM EST, after finishing job filename coming like 2024-04-16 22:00:00 PM  as per PST  filename_20240416220000 , which is wrong.

 

it should be filename_20240417010000


Kindly let me know how to fix this issue.

 

3 REPLIES 3

Sujatha V M
Kilo Patron
Kilo Patron

@Sironi Please refer the link below : 

 

https://www.servicenow.com/community/developer-forum/change-file-name-in-mid-server/m-p/1718723

 

Please mark this as helpful and accept it as a solution if this resolves your query.

Thanks,

Sujatha V.M.

Please mark this as helpful and accept it as a solution if this resolves your query.
Sujatha V.M.

Hi @Sujatha V M ,
I have gone through this one already, They are using JAVA packages 

 this.File = Packages.java.io.File;
        this.FileOutputStream = Packages.java.io.FileOutputStream;
        this.FileInputStream = Packages.java.io.FileInputStream;
        this.Path = Packages.java.nio.file.Path;
        this.Paths = Packages.java.nio.file.Paths;
        this.Files = Packages.java.nio.file.Files;
        this.StandardCopyOption = Packages.java.nio.file.StandardCopyOption;

, In Future it may come issue. problem is client may ask why are you using Packages and all  .

Any other solutions  please 

Can I expect any updates