01-28-2009 09:53 AM
I have a numeric control set to display relative time in 30min increments.
I want to record the value displayed on the control as a string. Unfortunately, when I use the "convert number to decimal string.vi", the resulting string is just the value in seconds.
How can I get the displayed value as a string? (i.e. 1:30 for one hour and thirty minutes)
Thanks,
Sean
Solved! Go to Solution.
01-28-2009 10:29 AM
If you right click your control and choose properties -> display format and the click the "Advanced editing mode" radio button you will get the format string for the control, something in the line of %<%H:%M>t. You can use this format string with the "Format Into String" function and the just wire the control as input, and you should get your string.
//Martin
01-28-2009 12:00 PM - edited 01-28-2009 12:01 PM
01-28-2009 12:14 PM
01-29-2009 05:15 AM
[...] it is like trying to crack a walnut with a sledge-hammer.
I resemble that remark!
I guess I didn't understand the original post. I played around with M_Peeker's method but got confused, then a person walked by and I got distracted...
Jim
01-29-2009 12:32 PM
Hi Sean.C!
M_Peeker's suggestion is a good one. One step that might clear things up is that you need to set the format string input to %<%H:%M>t.
Kristen H.
01-08-2010 12:51 PM
Kristen:
When I try this, I get an error that I have too many format specifiers?
Regards,
Greg
01-11-2010 09:43 AM
Hi gstanczak,
can you post what you tried? Take a look at the Help on Format Into String Function- there's a link under the format string input to the Format Specifier Syntax page (link says "format string") Using this reference will help you get the string you are looking for.
Kristen H.