NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I programmatically set start_date_time in TestStand?

Solved!
Go to solution

There are times when we might use TestStand to load data to the database for a test which occurred previously.  In this case the start_date_time would need to be set programmatically.  Is there a way to do this?

0 Kudos
Message 1 of 3
(1,410 Views)

Hi, Can you elaborate your requirements bit more.

 

Regards,
Dharani | CLA | CTD

Regards,
Dharani | CLA | CTD
0 Kudos
Message 2 of 3
(1,371 Views)
Solution
Accepted by topic author Jenn2021

I figured it out.  Posting solution here to support community.

 

From within Main sequence you can set time in this way:

 

RunState.Root.Locals.StartDate.Year = Locals.Year,
RunState.Root.Locals.StartDate.Month = Locals.Month,thin M
RunState.Root.Locals.StartTime.Hours = Locals.hour,
RunState.Root.Locals.StartTime.Minutes = Locals.minute,
RunState.Root.Locals.StartTime.Seconds = Locals.second,
RunState.Root.Locals.StartTime.milliseconds = Locals.millisecond

Message 3 of 3
(1,365 Views)