07-31-2023 04:35 AM
How do you combine both the array and the timevalues? Both have the same number of rows but I am not sure how to combine so that I can output a csv file. Thank you. (I transpose the 2D array so that it has 3 columns of y data points, with y number of timestamps)
Solved! Go to Solution.
07-31-2023 04:44 AM
Hi beginner,
@Programming_beginner wrote:
How do you combine both the array and the timevalues? Both have the same number of rows but I am not sure how to combine so that I can output a csv file. Thank you. (I transpose the 2D array so that it has 3 columns of y data points, with y number of timestamps)
Simple solution: convert to timestamp array to a DBL array using the ToDBL function. Then prepend the additional row/column as discussed in your other thread(s)!
Warning: this result may not fit with your requirements as it converts the timestamp to the number of seconds since LabVIEW epoch.
So what are your requirements?
07-31-2023 04:48 AM
will try that. Thank you.
07-31-2023 08:10 PM
Here are my timestamp values. If I use a DBL function, it just outputs an array of constant numbers.
Is there any other way?
07-31-2023 08:22 PM - edited 07-31-2023 08:26 PM
Also, I would like to insert a column heading (1D array of strings), but the data type just doesn't match.
EDIT: Just decide to call multiple write to csv (one for string type, then the other with just numeric data with append set to True)
08-01-2023 01:55 AM - edited 08-01-2023 01:56 AM
Hi Beginner,
@Programming_beginner wrote:
Here are my timestamp values. If I use a DBL function, it just outputs an array of constant numbers.
Did you read my previous message carefully?
I explained "Converting timestamps to DBL gives the number of seconds since LabVIEW epoch" - do you understand that sentence? Did you read the LabVIEW help on timestamps?
(And no: when the timestamps differ, then you will NOT get an array of constant numbers.)
@Programming_beginner wrote:
Is there any other way?
I asked for your requirements, but you didn't provide them!
You can also convert the timestamps to strings: I recommend to read ISO8601…