LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Date and time from array of string

I have managed to read information from an excel spreadsheet I am using and display different parts of it in indicators on my front panel. But the data being displayed for the cells that contain the date and time are showing up incorrectly.

 

The date of 15/08/2014 shows in the indicator box as 41866 and the time of 13:55:00 shows as 0.579861111111111

 

Is this something I need to change in the excel file or do I need to alter the data in the array before displaying it in the indicator.

Sorry if this has been explained in the past. I just cant seem to see a previous solution.

 

Thanks in advance

0 Kudos
Message 1 of 3
(2,168 Views)

Hi n,

 

please search for your problem in the forum. This has been discussed a lot of times before! (keywords: Excel LabVIEW timestamps)

 

Excel stores timestamps as number of days (your 41866) and part of days (0.5798d = 13H55M). You need to convert those numbers using some (more or less) simple math to LabVIEW timestamps!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(2,164 Views)

Thanks for the help. I have solved the problem and it was something I had to change in the excel spreadsheet so that I could read the info as text instead of number. I used an excel formula to do this.

 

0 Kudos
Message 3 of 3
(2,150 Views)