09-22-2015 07:33 AM
Hi,
I've a numeric control (in time format) in which I have hours:minutes:seconds and I want to convert it into a string. The problem is that the hours number is incremented by one, and if I insert a number of hours bigger than 24 the string doesn't display it correctly.
What should I do to make it work?
Thanks
Solved! Go to Solution.
09-22-2015 07:40 AM - edited 09-22-2015 07:45 AM
You are using a function that is set to take a numeric value that is based on the UTC clock and then convert it to a clock display based on your current timezone. My guess is that you are in GMT +1 which is why you see an hour added to it.
You need to use the Format Into String function for this with the appropriate time codes set for the format codes. %t is for relative time. This takes number you enter and turns it into hours, minutes, and seconds, rather than trying to create a clock display for it. Which is why your code can't roll beyond 24 hours. (There is no 25 o'clock on a clock face).
09-22-2015 12:18 PM
Want an ISO 8061 standard time string? Then you need to slightly modify the scan, and format into string, formatting options.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord