05-31-2017 10:33 AM
I used the seconds() function to get the time when I ran the TestStand sequence. How do I convert this number of seconds into a hr:min:sec format?
06-01-2017 07:23 AM
Hi sportsguy99
Does Time() give you what you need?
Steve
06-01-2017 08:13 AM
Yes, but I have another question. I have data coming from the Time() function and it says the date of 6/1/2017 and the other date I get from a program into a CSV file which I cannot change the format of and it returns a date of 06/01/2017. I try to put a IF statement and have one test if it is less than or equal to, but the 06 is always less than even if they are the same date since the 0 in front. How do I fix this issue? Or is there another way to convert it to work?
06-04-2017 11:26 AM
Hello sportsguy99, could you check this example? Here output date is formatted to "04.06.2017 18:25:09" format. Thus, you can compare dates, as they'll have the same length.
Sincerely, kosist90
06-05-2017 02:42 AM
You can use the 2nd parameter of the Str function which set the format of display of the 1st parameter of the function
For example : format ' Str(Locals.Month,"%02d") ' will display the Locals.Month variable with at least 2 digits, adding a zero before if necessary
Regards