NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Customize date/time format in report file name

I want my TestStand UUTs reports (Batch process model) to have file name of the following format:

 

UUT_yyyyMMddHHmmss.txt

 

In particular, I want to use year-month-day for the date component, and 24-Hr format for the time component.  I'd also like to remove the [ ] that the default file name format includes.

 

The Report Options -> Report File Pathname dialog does not seem to allow this level of configuration, and I cannot find where is the appropriate place to make this change.  Can I do this in a sequence file callback in my client sequence file, or do I need to modify the process model itself?  I've also already made changes to ReportGen_txt.seq for customizing the internal format of my report, so I can make the change there as well if needed.

0 Kudos
Message 1 of 5
(2,992 Views)

Hi bdybala,

 

Why do you want to configure the file name in this format? If there is something external from TestStand that requires you to do this, would it be easier to change that requirement? 

 

I haven't personally tried what you're doing, but maybe this documentation will help you:

The following sections of this link are likely most relevant to you. Perhaps the "Specify Report File Path by Expression" option will enable you to do what you want?:

"TestStand Report Formats" - table showing pros/cons of different report formats

"Configuring the Report File Pathname" - describes the step you took and additional actions you can take.

https://www.ni.com/en/support/documentation/supplemental/08/teststand-report-generation-and-customiz...

 

Best,

 

Ben

Technical Support Engineer

National Instruments

0 Kudos
Message 2 of 5
(2,928 Views)

Why do you want to configure the file name in this format? If there is something external from TestStand that requires you to do this, would it be easier to change that requirement? 


This is a requirement from my customer.  My customer wants to be able to sort the logs by UUT serial number, then by date/time (for cases where a UUT need to go through the test procedure more than once).  The format specified in my original post is a common way to do this.  

 

I've already gone through the link you provided, but the expressions available do not allow customizing the format of the date and time - they only seem to use the date/time format specified in the Windows OS culture.

0 Kudos
Message 3 of 5
(2,926 Views)

So is this possible? I need  almost exactly the same thing as @bdybala, but I couldn't find a way to config the timestamp format in the report file name. It seems to be coming only from the OS setting itself, which doesnt fit the requirements I have.

 

The string could be generated in labview easily, but how to add it to the report file name?

 

1984_0-1655716022350.png

 

0 Kudos
Message 4 of 5
(1,966 Views)

I would modify the 'ReportOptions' callback in the process model.  From there you can set the ReportFile Path and in your case you could call that VI you generated to get the correct filename.  

 

I did this on a previous project to set the filename to 24hour time and the SN of the product, it was before they added all the options to customize the report filename using macros.

 

Teds_0-1659970886494.png

PH

0 Kudos
Message 5 of 5
(1,814 Views)