LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simple string to array problem

Hello All,


I wrote a program that writes the time/date/ etc.. in this format. "%m/%d/%y %H:%M:%S"
However, to be able to write into spreadsheet, I have to transform it into an array..

However, the array seems to only display the %m/ part and not the rest.

What should I do to fix it?

Thanks

Ben
Aquaphire

---USING LABVIEW 6.1---
0 Kudos
Message 1 of 7
(3,057 Views)
I was playing with something similar to this in one of my programs. All I did was wire the output of the "Format Date/Time String" to a "Build Array" function, and then I was free to wire that array to "Array to Spreadsheet String" or however you want to get it into the spreadsheet. Hope this helps.

Geoff
0 Kudos
Message 2 of 7
(3,051 Views)
Hey dennis,

Thanks for answer.
However, thats exactly what I did. The problem is that it will cut off half of the information...

instead of showing: 06/23/05 14:16:02
it shows: 06/

(using the build array fct)
Aquaphire

---USING LABVIEW 6.1---
0 Kudos
Message 3 of 7
(3,048 Views)
You're going to have to post an example of the problem you're having. I've attached a VI with a build array and the text you mention, and the output array'sfirst elemetn has the entire string.
Message 4 of 7
(3,044 Views)
here it is. I can't see your example since i only have labview 6.1...


thanks.
Aquaphire

---USING LABVIEW 6.1---
0 Kudos
Message 5 of 7
(3,041 Views)
The build array is not cutting anything off. You didn't include ModifiedWriteStringToSpreadsheet and that's probably where the problem is. Use a format string of %s to tell the function to write a string to the file instead of a number. With a default format specified of %.3f, only the first part of your date/time is a valid number and the rest is truncated.
Message 6 of 7
(3,033 Views)
Luv ya dennis. You're a god.

Many thanks 🙂
Aquaphire

---USING LABVIEW 6.1---
0 Kudos
Message 7 of 7
(3,026 Views)