04-13-2011 07:32 AM
The Excel file contain some string data and "date". Date is in "11-Apr-11" format, Upon executing the VI; it is appending the "date" as "40613" instead of "11-Apr-11" to the table on the front panel....
04-13-2011 07:59 AM - edited 04-13-2011 08:01 AM
Hi,
This value represents the number of days from 00.01.1900. But this is the Excel format.
In Labview format the date are the days from 01.01.1904.
Thus, this number has to be corrected in order to fit the LabView format and to be multiply with the seconds in one day 3600 x 24 hours.
Please make some test to be sure that it works and adjust the offset 1462 if necessary.
Paul
04-14-2011 02:13 AM
Hi,
This is the issue i am facing.
Attached is the sample excel sheet which has string, numbers, and date format in a sheet.
When reading this excel sheet as text, i am expecting the output 1D array (say a) of string indicator to have the following values (in order of array indices) - a[0] = Hello, a[1] = 109, a[2] = 4/2/2011.
But actual read value is a[0] = Hello, a[1] = 109, a[2] = 40635.
Assume Excel sheet is very huge and has many date entries in it.
Is there any generic VI which will read all the entries as text and display the date in expected format.
Your help is greatly appreciated
04-14-2011 02:52 AM
Hi,
This is exactly what I've sent to you in the previous post. You just have to add a String to Float conversion vi and it's ready. Take another look in the attachment from this post.
I think it's exactly what you need. Convert from a string "number" 40635 to date. The VI does this.
Paul