LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Time Stamp read problem with Spreadsheet String To Array

Dear Friends,
 
I would line
0 Kudos
Message 1 of 60
(5,472 Views)

Senper

Your attempt at posting hasn't turned out quite as you would have planned, I expect.

Just to give you the heads up.

If you want to clarify and get the help

David

Message Edited by David Crawford on 02-02-2006 08:56 AM

0 Kudos
Message 2 of 60
(5,435 Views)

Dear friends

I need some help with a Spread String , it has a time stamp and then some colums separated with tabs.

When I use Spreadsheet String To Array I can't get the time stamp property.

The format that I with the time stamp is this <%y-%m-%d  %H:%M:%S%1u>

I have tried with diferents formats to decode the time stamp data <%y-%m-%d  %H:%M:%S%1u> %f %s but I can not get the time stamp data propertly.

An this is the dat i´ve been using

 

Thanks

I am sorry about the first message, and for my bad english 🙂

0 Kudos
Message 3 of 60
(5,429 Views)

Hi Senper

If want to read this data in for processing you can read in your file and convert it into an 2D array.

Get back to me if this not what you want.

David

Message Edited by David Crawford on 02-02-2006 09:16 AM

Message 4 of 60
(5,413 Views)

Hi David,

First of all thank you for your help and your time.

What I really need is to plot in a X-Y graph the data using the time stamp as an X axis and some of the other data as Y.

I need somehow to convert the time stamp string to an ¿number array?. And if it is possible not to process individualy every data because I expect to get a big file.

So I thought that using Spreadsheet String To Array was a good idea. In the image are the ways that I was trying to solve the problem.

Thanks in advance

0 Kudos
Message 5 of 60
(5,394 Views)


@senper wrote:

Hi David,

First of all thank you for your help and your time.

What I really need is to plot in a X-Y graph the data using the time stamp as an X axis and some of the other data as Y.

I need somehow to convert the time stamp string to an ¿number array?. And if it is possible not to process individualy every data because I expect to get a big file.

So I thought that using Spreadsheet String To Array was a good idea. In the image are the ways that I was trying to solve the problem.

Thanks in advance


Spreadsheet string to array can not deal with timestamps. So you will have to use your own routine that does convert the spreadsheet string into the desired data. I would write it up all from scratch by reading in the file line by line and parsing each line with Scan From String and friends.

For you it would be probably simpler to take the approach as pointed out by David and then postprocess the 2D string array in a loop converting each column to the desired datatype (Timestamp, numeric value, whatever).

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 6 of 60
(5,383 Views)
Senper
 
I have demonstrated how to convert the string into a timestamp using the first timestamp in the data set. Its done by using scan from string. The data from that is then used to create a date/time record which can then be converted into a timestamp. Ultimately it could be in seconds since 1904.
 
Its a matter of picking it up from there and sticking it into a loop to create your graph.
 
David
 
File attached is 7.1
Message 7 of 60
(5,381 Views)

David,

That is exactly what I nedd.

Thanks a lot to both Rolf & David.

0 Kudos
Message 8 of 60
(5,368 Views)
Hi guys,

It looks like you were able to help Senper out so I thought I might try and hijack the thread to see if you could shed some light on my similar issue.

I am trying to read a spreadsheet string as well but I need to feed the data to 3 column SQL table.  I am running into the same timestamp related issue and I see David's fix.  Can anyone explain how his fix would best fit into my program (attached) so that I could feed the timestamp all the way to the SQL table using proper format versus jsut a string of text? 

I am also getting an error on insert and I am trying to figure out if it is related to amount of data I am trying to insert or the way I set the column names in the DB Tools Insert VI.

Thanks for your help.

Greg
0 Kudos
Message 9 of 60
(5,357 Views)
Greg
 
This should have gone in its own thread as it nothing to do with the orginal posters. When your create your own thread you can always provide links to threads that you think are relevant.
 
Anyway... Not much of a DBT man, more into LabSQL so I am pretty rusty with the toolkit.
 
Looking at your VI I wouldn't try to insert an array of clusters. Cut your code down so that you have just one of your cluster records and see if it that works. If it does, put your INSERT inside a for loop then autoindex out your individual array elements to feed the insert. What I think is happening is that the INSERT vi is seeing each element of the array as a column which is much more that 3 columns. Also make sure your table has three fields.
 
 
Not an expert but I hope this helps you on your way.
 
David

Message Edited by David Crawford on 02-03-2006 02:19 AM

0 Kudos
Message 10 of 60
(5,350 Views)