cancel
Showing results for 
Search instead for 
Did you mean: 

Lapsed time incorrect format on seconds

SOLVED
frn
Member
Member
Solved!

Lapsed time incorrect format on seconds

Message contains an attachment

Hi,

 

The attached VI keeps tract of elapsed time and I am having a problem with the format in the seconds section. It gives me 3 digits and does not count the seconds correctly.

 

I would like to have only 2 digits for the seconds and count correctly as 01, 02 .. 09, 10, 11, . . . 59  (seconds section).  

 

Could someone suggest a change to attached VI?

 

Thanks,

 

frn

4 REPLIES 4
dkfire
Active Participant
Solution

Re: Lapsed time incorrect format on seconds

The reason you are not seeing the right number is that the value you get out of the last Quotient & Remainder Function is NOT the seconds, but MILIseconds.

Add one more Quotient & Remainder with a 1000 as y. Then take the floor(x/y) as your seconds.

 

johnsold
Knight of NI

Re: Lapsed time incorrect format on seconds

Message contains an image

If you do not need a string output, consider subtracting timestamps and formatting the numeric display of the difference as Relative Time.

 

Lynn

 

Time display.png

frn
Member
Member

Re: Lapsed time incorrect format on seconds

Message contains a hyperlink

Thanks dkfire,

 

It works great!

 

frn

frn
Member
Member

Re: Lapsed time incorrect format on seconds

Thanks Lynn for your input, but I need string as an output.  

 

frn