LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"Date/Time To Seconds" Function does not respond to "fractional second" input

Solved!
Go to solution

The "Date/Time To Seconds" function (contained in the Function\Programming\Timing - Palette) does not respond to the "fractional second" input (see attached example).

Reimar Spohr
0 Kudos
Message 1 of 8
(3,267 Views)
Solution
Accepted by ReimarSpohr

Hi Reimar,

 

as I don't see your example I can only say: It works as expected:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 8
(3,264 Views)

I think he means if you go straight to a DBL type.

Tim
GHSP
0 Kudos
Message 3 of 8
(3,250 Views)

Hi Tim,

 

there is only one "Date/Time to Seconds" function in the mentioned palette...

 

Can you explain "go straight to a DBL type"? I don't get the point.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 8
(3,245 Views)

User posted their code in a new thread. Smiley Mad

 

Let's keep the discussion here.

0 Kudos
Message 5 of 8
(3,239 Views)

To poster:

 

I tried your example. Works fine. Are you trying to set the control to a value greater than or equal to 1?

 

From the documentation:

 

fractional second is the fractions of a second since the start of the second. Values must be greater than or equal to 0 and less than 1.

Message 6 of 8
(3,233 Views)

Why convert at all? You should be able to simply add the DBL value to the timestamp.

 

Jim Kring's "Thinking in G" blog has a nice example of relative time calculations.

 

http://thinkinging.com/2007/06/08/labview-tip-easy-relative-timestamp-calculations/

 

0 Kudos
Message 7 of 8
(3,212 Views)

Are you trying to add fractional seconds to the existing time that includes fractional seconds?

 

Or are you trying to replace the existing time with a time that is a particular fractional second?

 

You are doing the latter.

0 Kudos
Message 8 of 8
(3,193 Views)