LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

String to number conversion

IS it possible to convert a string from   12:30:55     to a numeric . output of numeric should also display   12:30:55    

0 Kudos
Message 1 of 18
(3,216 Views)

Hello,

 

Is it ok for you to use a timestamp instead of a numeric?

 

If yes, you can use the "scan from string" function like this :

Clipboard01.png

 

Hope this helps


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 2 of 18
(3,211 Views)

NO 

 

See the below code in that my time string will be incremented which i have to give to x axis of waveform . once see the code what i have attached you will come to know clearly

0 Kudos
Message 3 of 18
(3,188 Views)

Oh, ok... the timestamp format can be cast to DBL with the "to DBL" primitive that you can find in the numeric palette.

 

Then to have your X scale to display time in the format (HH:MM:SS) you can right clic on the graph, select properties, go to the "Display Format" tab and edit the X-scale format as you wish, see example below :

 

prop.png

 

Hope this helps

 


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 4 of 18
(3,183 Views)

no sir see this code now my input is string and output should be in dbl what to do

0 Kudos
Message 5 of 18
(3,169 Views)

Is this ok?


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 6 of 18
(3,164 Views)

Hi,

 

You can also thank TiTou for his work and his answers trying to help you instead of changing your needs with examples without any explanations!

 

Regards,

Olivier L. | Certified LabVIEW Developer


0 Kudos
Message 7 of 18
(3,160 Views)

output form of dbl should aslo appear as 55:06:33  

it should not display  63393

0 Kudos
Message 8 of 18
(3,152 Views)

HI Olivier,

 

How comes you're blue? Are you or have you been an NI employee?

 

Don't worry I'm used to customers who have evolving needs 😉


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 9 of 18
(3,146 Views)

And you should try to think about a solution by yourself!

 

It's not possible for a numeric Control to display Time Values, that's why Timestamp controls exist!

Olivier L. | Certified LabVIEW Developer


0 Kudos
Message 10 of 18
(3,142 Views)