02-03-2016 02:47 AM
Hii,
I have to Wait atleast 15 mins after the PC Boots and then start with the test.
with the "/r wmic os get lastbootuptime" command line Argument I do get the Result [String]
LastBootUpTime
20160203072206.610798+060
but the formatting is the Issue
Is there any elegant way to get the same in a Numeric format else I have to Parse the result or Script better...
regards
Akshay
02-03-2016 08:56 AM
You could simply parse using the System.Management assembly in a .NET step.
Place down a .NET action step
Set the Assembly: to System.Management
Set the Root Class: to ManagementDateTimeConverter
Set the .NET Invocation: to ToDateTime(System.String).ToLongDateString() //there are other methods here that might be a better format
Pass your string (20160203072206.610798+060 probably as a variable) to the dmtfDate when your cursor is on ToDateTime(System.String)
Move your cursor to ToLongDateString() and put the variable where you want to store it in the Return Value
Let me know how it works. I'm shooting from the hip here. See attached image.