08-19-2015 04:00 PM
Hello,
so I am trying to read a data from a text file. In the picture you will see how the data is written in the file. My issue is I am using read from spreadsheet.vi and it will not read the date and and time data. For example if the date and time in the file is 19 jan 2015 22:09:05 , the output of the read from spreadsheet. vi comes out as 19 in one array slot for the date and 22 in another for the time. I use comma delimited and %s, it doesnt work at all. I tried saving the file as .csv file and still I get the same answer.
Please help.
P.S please post any vi solution in Labview 2012
08-19-2015 04:09 PM - edited 08-19-2015 04:13 PM
uh huh... that's a weird way to share your spreadsheet data with us...
You probably have a delimiter problem. Share your code and/or the actual text that you're trying to read and we can help more.
You're goingt to get an array like this: [9. 5, 3, 43, 69, 6493, 23, 28, Jan, 2015, 13:42:15]
If the delimiter is the same between all of those cells. You're then going to have to take the strings (each element of the array) and convert to a Timestamp using Scan From String
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
08-20-2015 08:56 AM
P.S. -- please do not post pictures. You are asking us to take the extra trouble to help you by posting code, and for a specific Version of LabVIEW. Have the common courtesy to help us by posting (a) actual data files with the data intact, and (b) actual VIs of the code you are trying to get to work. We are not your indentured servants (see 13th Amendment). If you need to post multiple files, consider placing them in a folder and sending the folder as a Compressed (.zip) File.
BS
08-20-2015 09:33 AM
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
08-20-2015 09:53 AM - edited 08-20-2015 09:55 AM
Check out the When Posting Code section of this link. It talks about snippets and how to post code which we can better help you with.
https://decibel.ni.com/content/docs/DOC-40451
Also if you post a snippet it states what version of LabVIEW it was made with, so we try to post code back in that version, knowing you should be able to open it.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord