04-02-2018 04:55 PM
Hi there. I need a help. I work with excel table. I have the task to get table .exsl in labview. I done it with this vi, but i have problem with date format. In table date (time) looks like dd/mm/yyyy hh:mm:ss.000 but when i getting table in labview i have different result. Help, thank you.
04-02-2018 05:11 PM
Take a look at this article. Excel does not store the timestamp as text, but as the number of days from Jan 1, 1900. You will have to do some manipulation to convert it into LabVIEW time (seconds from Jan 1, 1904), or you can change your Excel settings. Then all you need to do is convert days to seconds, and use "Get Date/Time String" in LabVIEW.
04-02-2018 06:48 PM
Thank you for your answer. I understan main idea now. But can you help me with converting in my vi? what do i wrong? What format of string i have to choose?
( in vi i try to get date array in seconds)
04-02-2018 07:16 PM
A couple of points:
I think something like this should work for you... You will just have to change the time zone conversion.
04-02-2018 08:01 PM
Thank you so much for teaching me this. And i have only one step now.How do this in my vi. I have bad knowledge about string formats. I have subarray of date and then i make array of date, how make multiply and how choose format becouse subarray have 41731,3230308128 type and array have 41731,3. In result i should make plots in waveform graph. Thank you.
04-02-2018 08:02 PM
forgot
04-03-2018 11:31 AM
@teslo wrote:
Thank you so much for teaching me this. And i have only one step now.How do this in my vi. I have bad knowledge about string formats. I have subarray of date and then i make array of date, how make multiply and how choose format becouse subarray have 41731,3230308128 type and array have 41731,3. In result i should make plots in waveform graph. Thank you.
Hi Teslo,
1. For graphing purposes you will not want a string, you will want either DBL format (as you have it), or time stamp format.
2. The "To Time Stamp" function actually accepts arrays, so your wire will not be broken. If your data is evenly spaced, you can use a waveform graph and set the offset and dt appropriately. I actually prefer XY graph, because it handles unevenly spaced samples as well. XY graph takes many data types, (found in the help), but for your case you will want a cluster of timestamp and numeric data. For multiple plots, just create multiple clusters and build into array.
3. It never hurts to see if a function accepts an array (a lot of them do). But if they don't...
4. Just call the function inside a For Loop. The auto index tunnel with brackets [] means it will run the length of the array.