NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

DD/MM/YYYY to MM/DD/YYYY in TestStand

Hi All,

 

I need to convert a date to American format MM/DD/YYYY from UK format DD/MM/YYYY. Is there a way I can do this in Teststand?

 

Currently the date is coming from the operating system regional settings but I would prefer to keep the regional settings to UK format and change the date somewhere in my sequence so when it is saved to txt file it is in the US format.

 

Thanks

0 Kudos
Message 1 of 4
(1,969 Views)

Where do you want to have your date changed (report file, etc.)?

 

The answer to that question will help us provide most suitable solution.



0 Kudos
Message 2 of 4
(1,902 Views)

Hi Pitol,

 

The date is being saved directly into a txt file using a bit of labview code.

 

I get the date within teststand using

 

Locals.UKdate = Date()

 

From here Locals.UKdate is fed into a labview code to save it to a txt file among other parameters.

 

I was hoping there would be a neat way to do it in Teststand using an expression but I could probably play around with the string manipulation and re shuffle the string in labview.

 

thanks

0 Kudos
Message 3 of 4
(1,888 Views)

You can get the Date using the following: 

Date(False,Locals.Year,Locals.Month,Locals.Day)

and then reformat it as string within TestStand

 

0 Kudos
Message 4 of 4
(1,879 Views)